Conversion from relative to absolute URLs does not work

by michix, Thursday, October 10, 2013, 09:38 (4018 days ago)

Hi,

I am very happy with selfoss, however, I encountered the problem that the conversion for relative URLs to absolute URLs does not work for heise websites. I looked at the code but I was not able to find any problem here (the regular expressions seems to be fine). However, I am not a PHP expert.

Has anybody else the same problem?

Regards,
Michael.

Conversion from relative to absolute URLs does not work

by michix, Wednesday, October 16, 2013, 09:49 (4012 days ago) @ michix

Okay, I found out a little bit more regarding this problem. Take this webpage for example:

http://www.heise.de/newsticker/meldung/Vor-80-Jahren-Start-des-oeffentlichen-Fernschreibwesens-in-Deutschland-1979886.html

Here you find the following line:

<img src="/imgs/18/1/0/9/3/4/1/3/Fernschreibmaschine_mit_Telefonanschluss-bcd58419497aac2f.jpeg" width="250" height="170" alt="" data-zoom-src="/imgs/18/1/0/9/3/4/1/3/Fernschreibmaschine_mit_Telefonanschluss-1ef1f7a29d9f5a52.jpeg" />

This line is then transformed by selfoss into the following:

<img ref='/imgs/18/1/0/9/3/4/1/3/Fernschreibmaschine_mit_Telefonanschluss-bcd58419497aac2f.jpeg' alt="" />

Since it says "<img ref='/..." this is not matched by the regex which puts the "http://www.heise.de/" upfront. I also wonder why an "<img src=" is transformed to an "<img ref=".

Tobi, could you please help?

Many thanks,
Michael.

RSS Feed of thread
powered by my little forum