• Resolved silverks

    (@silverks)


    Hi there,

    I’ve been using the TinyMCEcomment plugin for quite some time. It has been working great and looks even better on my blog with self-made theme.

    However, the only problem is that whenever somebody submitted a comment, new paragraphs (hitting Enter once and not Shift + Enter) in the comment become line breaks instead. Also, lists become line breaks as well.

    Any help would be greatly appreciated. My blog is at https://www.khairul-syahir.com, if that would help.

Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter silverks

    (@silverks)

    I found out that the above issue is because WordPress automatically strip all HTMLs from the comment, including all the <p>,

      ,

        , etc.

    I noticed this as when I’m logged in and post the comment, all the html tags were included in the comment (and I notice the _wp_unfiltered_html hidden input in the form).

    Question is, how do I get the same functionality for non-logged-in users? I know allowing full unfiltered html comment could be dangerous, but at least allow the standard tags (like the one here in WordPress support) through?

    Please if someone can help me. Thanks.

    Thread Starter silverks

    (@silverks)

    ok, i’ve resolved this issue already. It seems like the kses filter is stripping out all html tags, even the usual ones.

    I replaced the kses filter with HTML Purifier using HTML Purified plugin, and everything works fine.

    HTML Purifier is supposed to be the better sanitizer, but it is also more resource-intensive. But since I haven’t noticed any performance hit on my website, and also the sanitizer will only be invoked when saving posts and submitting comments, it’s a good enough solution.

    Maybe WP developers should implement a better HTML sanitizer than kses? even htmLawed seems to be better…

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘[Plugin: TinyMCEComments] Formatting issue’ is closed to new replies.