• Resolved cag8f

    (@cag8f)


    Hello. Thanks very much for the plugin. It is quite handy and easy to use. I have one question, about the post titles displayed by the plugin. One of my post titles has some HTML in it, to render a portion of the text as italic. WordPress has no problem applying this HTML to the title on my blog page (see here). But when I display the same post using your plugin, the HTML is not recognized (see here). Are there any fixes or workarounds you might know of? I’d really like to use your plugin and keep this text as italic if possible.

    Thanks again.

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author Martin Stehle

    (@hinjiriyo)

    The title text is sanitized before printing out. The sanitation includes escaping the HTML tags to print them out “as is”. That behaviour is highly recommended in the WordPress documentation for plugin developers for security reasons.

    So I did the best. And in your case it seems to be overkill…

    I just dove into the WordPress code and found out that even there the post title is not sanitized the way as I implemented. So I will remove the sanitation to let your HTML elements work.

    Thread Starter cag8f

    (@cag8f)

    >> So I will remove the sanitation to let your HTML elements work.

    Wow thanks very much for that. Will that be in an upcoming update to the plugin that I’ll need to install? I currently have version 3.0.2.

    >> That behaviour is highly recommended in the WordPress documentation for plugin developers for security reasons.

    It is quite odd that WordPress recommends such sanitation, but does not follow the same protocol. Normally they are pretty consistent about that kind of stuff.

    Plugin Author Martin Stehle

    (@hinjiriyo)

    With the new version 3.0.3 post title HTML is left untouched and will take effect.

    If you like this plugin I would be glad about your review.

    Thread Starter cag8f

    (@cag8f)

    OK now I see the update option in my back-end. When I logged in yesterday, WordPress did not notify me that an update was available. Odd.

    Anyway, I updated the theme and the HTML markup is now applied to the titles as expected. Thanks very much for that. I will leave a review now.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Post titles cannot render HTML’ is closed to new replies.