WordPress.org

Forums

[Plugin: WordPress Popular Posts] Post Title Special Character Escape Codes (21 posts)

  1. PigMonkey
    Member
    Posted 5 years ago #

    I have a post with an ampersand (&) in the title. When it shows up in my list of popular posts the ampersand is printed in the html as & rather than the proper escape code, which is breaking my page's validity. On the actual post page, WordPress escapes the ampersand properly as & # 0 3 8 ; (I put the spaces in so that the forum doesn't translate it to the ampersand character). WordPress Popular Posts needs to do this as well so that post titles with special characters can show up in the list without making the page invalid XHTML.

    http://wordpress.org/extend/plugins/wordpress-popular-posts/

  2. Héctor Cabrera
    Member
    Posted 5 years ago #

    Hi PigMonkey,

    Issue has been fixed on the dev version of my plugin. Will be releasing it this week.

    Thanks for your feedback!

  3. PigMonkey
    Member
    Posted 5 years ago #

    Is this supposed to be fixed in the new 2.1.0, or is the fix still in the dev version?

    I just upgraded to 2.1.0 and it isn't fixed. The ampersand in the title element of the a tag is being outputted properly with amp; (though I don't recall if this is different from the previous version of the plugin), but the actual text between the opening and closing a tag itself is still being printed with just a normal and invalid &.

  4. Héctor Cabrera
    Member
    Posted 5 years ago #

    Yup, version 2.1.0 should fix it. What's your site's URL?

  5. PigMonkey
    Member
    Posted 5 years ago #

    http://pig-monkey.com/

    Popular posts are being outputted down at the bottom, above the footer. Here's the line:
    <li><a href="http://pig-monkey.com/2009/12/02/k-m-match-case/" title="K & a m p; M Match Case"><span class="wpp-post-title">K & M Match Case</span></a> </li>

    (Spaces in the amp; bit so that the forum doesn't translate it)

    the a title="" bit is escaped properly, the actual link text is not.

  6. Héctor Cabrera
    Member
    Posted 5 years ago #

    I see. I made a few small changes on my plugin today and fixed that after reading your reply. I'll post here a download link tomorrow so you can try it out, ok?

  7. Héctor Cabrera
    Member
    Posted 5 years ago #

    Please download WordPress Popular Posts v2.1.1 beta* here.

    Let me know the results, please.

    * download link will be taken down once v2.1.1 goes public.

  8. PigMonkey
    Member
    Posted 5 years ago #

    Yup, that fixed it. Thanks for your work!

    <li><a href="http://pig-monkey.com/2009/12/02/k-m-match-case/" title="K & a m p ; M Match Case"><span class=\"wpp-post-title\">K & a m p ; M Match Case</span></a> </li>

  9. allancole
    Member
    Posted 5 years ago #

    Hi, This issue doesn’t appear to be completely fixed. I am having a similar issue however, it is occurring with quotation marks ( “ ” ‘ ’ ) instead of ampersands. I’ve just upgraded to version 2.1.1 and haven’t noticed any change. Here is a screenshot. Also, here’s a live link but we may need to switch to inch marks ( " ' ) for the time being.

    Any help would be greatly appreciated.

  10. JulioRFA
    Member
    Posted 5 years ago #

    With version 2.1.3 seems like the html special chars are broken:

    á é í ó ú ñ

    The — without encoding too ;)

    I have my site with UTF-8 charset by the way... ¿Why this still happens? ¿How the plugin handle the data? It´s so strange.

    I think... If the plugin parse text data with htmlspecialchars php function... this doesn´t happen...

    Cheers! ;)

  11. echezuria
    Member
    Posted 5 years ago #

    Hi guys,

    I'm having the same problem with version 2.1.3, special chars á é í ó ú ñ are broken on posts titles.

    My website is set with UTF-8 too (you can check the broken special chars on my popular posts list on sidebar).

    Could you make an update to solve this issue with the plugin please?

  12. Héctor Cabrera
    Member
    Posted 5 years ago #

    Hi guys,

    Please download WordPress Popular Posts 2.1.4 here and let me know if it fixes the issue.

  13. echezuria
    Member
    Posted 5 years ago #

    It works for me. Version 2.1.4 fix the special chars problem.

    Thanks a lot!

  14. allancole
    Member
    Posted 5 years ago #

    Yup, Version 2.1.4 fixed it for me! Thanks!

  15. Héctor Cabrera
    Member
    Posted 5 years ago #

    De nada ;)

  16. raonip
    Member
    Posted 5 years ago #

    Hi,

    I had the same problem with characters and now is fixed!!!

    Thanks for this GREAT plugin!

  17. JulioRFA
    Member
    Posted 5 years ago #

    Ya está resuelto, sos un capo ;)

  18. Héctor Cabrera
    Member
    Posted 5 years ago #

    It's your continuous feedback and suggestions what makes my plugin what it is now, so thank you all guys for your help!

  19. slicksno
    Member
    Posted 4 years ago #

    I am having a similar issue with ampersands on my sidebar widget. Some posts with an ampersand print correctly and others print & amp; (I put the space in for the forum) in the title. Also saw this with one post that had an apostrophe in the title it printed & raquo; in the title instead of the apostrophe. Looking at the html code there is an extra ampersand in front of all of the entities. I am using WP 3.0 and WPP 2.1.4. Any help would be appreciated. You can view both sites that I use this one and see what I am talking about...

    http://www.slicksno.com
    http://downsouthhiphop.com

  20. slicksno
    Member
    Posted 4 years ago #

  21. travelingsavage
    Member
    Posted 4 years ago #

    Not directly related to the problems others are having, but my instance of WPP stopped working after I used W3 Total Cache and minified a bunch of .js and .css files. Can't seem to figure out why it's no longer working. Help is appreciated!

Topic Closed

This topic has been closed to new replies.

About this Topic