Jump to content

flangefrog

Recommended Posts

Just a small issue with the feed reader plugin here.

 

I'm sure you're aware it, but the HTML special characters are getting encoded twice, making an ampersand display as & (& in the source). I would look into this myself but it will probably be a lot quicker for the original developer, and I'm currently busy with work and creating my Web Drive module.

Link to comment
Share on other sites

  • 4 weeks later...

Ok, I've found the problem:

 

/plugins/feed_reader/views/default/admin_main.pdt

Line 19, Column 145

 

Replace

<?php $this->Html->_($articles[$i]->data['title']);?>

With

<?php echo $this->Html->ifSet($articles[$i]->data['title']);?>

Any chance you could add this fix (or an equivalent one) to the core?

Link to comment
Share on other sites

In addition to the above, it looks like the same thing needs to be done for the URLs. URLs like index.php?foo&bar are encoded like index.php?foo&bar.

 

/plugins/feed_reader/views/default/admin_main.pdt

Line 19 Column 75

 

Replace

<?php $this->Html->_($articles[$i]->data['link']);?>

With

<?php echo $this->Html->ifSet($articles[$i]->data['link']);?>
Link to comment
Share on other sites

  • 3 weeks later...

Cody, I don't think that's correct.

 

For a URL index.php?foo=bar&baz=quz

foo = bar

baz = qux

 

For a URL index.php?foo=bar&baz=qux

foo = bar

amp;baz=quz

 

The ampersand should only be encoded when it's part of a param i.e. when you're passing a URL as a param.

Refer to http://tools.ietf.org/html/rfc3986#section-2

 

I think instead of using HTML entity encoding, you should be using something like rawurlencode() which encodes the URL according to the RFC mentioned above. Simplepie may do this itself, it seems to at least escape the content (which is why Blesta was double encoding it)

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...