fjbarker Posted May 13, 2008 Share Posted May 13, 2008 I've got a problem that is only showing up in IE.... Here's my echo statement: echo "<a href=\"".($this->link)."\" target=\"".($this->target)."\">".($this->title)."</a>"; This is the echo statement from my RSS parser.... link = link from rss feed target = target for the link (_blank or _self) to control what window the link opens in title = text for the link The code runs and works fine in Firefox but in IE the _self ("target"=_self) is not reconized in IE Here is the code that is generated by the PHP <a href="http://www.google.com " target="_self ">Google </a> Why is it placed on different lines.... I know this shouldn't matter but, for some reason it effects IE Link to comment https://forums.phpfreaks.com/topic/105457-solved-code-help/ Share on other sites More sharing options...
Lumio Posted May 13, 2008 Share Posted May 13, 2008 echo "<a href=\"".trim($this->link)."\" target=\"".trim($this->target)."\">".trim($this->title)."</a>"; Maybe you also need htmlspecialchars to avoid XSS. Link to comment https://forums.phpfreaks.com/topic/105457-solved-code-help/#findComment-540138 Share on other sites More sharing options...
craygo Posted May 13, 2008 Share Posted May 13, 2008 the class probably has a \n at the end of the values. Seems to going to a new line after each return value from your class. can try and fix that and see what happens Link to comment https://forums.phpfreaks.com/topic/105457-solved-code-help/#findComment-540139 Share on other sites More sharing options...
fjbarker Posted May 13, 2008 Author Share Posted May 13, 2008 Thank you both for your replies.... that fixed it! Link to comment https://forums.phpfreaks.com/topic/105457-solved-code-help/#findComment-540231 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.