Support » Plugin: Raw HTML » converted to <br> despite "Disable convert_chars" is checked

  • Hi there,

    This code:

    [raw]before line jump
    after line jump[/raw]

    is converted when saving the page to:

    [raw]before line jump
    after line jump[/raw]

    I have checked
    “Disable convert_chars”
    in the RAW html panel for this page.
    Shouldn’t “Disable convert_chars” prevent this to happens?

    I’m not using the visual editor ( Disable the visual editor when writing is checked off in my wp profile).

Viewing 9 replies - 1 through 9 (of 9 total)
  • me again.

    The problem reporte din my previous post was after deactivating and reactivating the plugin.

    In fact it messed all html code texts contained between [raw] [/raw] tags and messed up completely my page (no worry I was working on a local copy and I have backups).

    Now when I browse the page I get, for [raw] [/raw] fragements things like this:
    &lt;div class=&quot;mk_benefit_area&quot;&gt; &lt;div class=&quot;mk_benefit_sub_area&quot; style=&quot;background-image: url('http://localhost/mkreloaded/wp-content/uploads/image-lib/benefits/550×367-storage-optimized-hover.jpg&#039;);&quot;&gt; &lt;a onclick=&quot;return ulp_open('B8eISlVJHeex1qNv');&quot; href=&quot;#&quot;&gt; &lt;img

    As you can see it completely messed-up the code!
    Any idea?

    Plugin Author Janis Elsts


    The two code samples in your first post look identical. You need to wrap it in backticks to prevent the forum from interpreting it as HTML code (use the “code” button in the toolbar).

    Shouldn’t “Disable convert_chars” prevent this to happens?

    If I remember correctly, “Disable convert_chars” is not responsible for <br> tags. convert_chars is a WordPress function that converts ampersands (&) to HTML entities. Try the “disable automatic paragraphs” setting instead.

    Now when I browse the page I get, for [raw] [/raw] fragements things like this: […]

    That looks like what might happen when switching between Text and Visual, or using a third-party post editor. Are you running any other plugins that could affect how HTML code works, or using some kind of a site builder (like what’s included with some themes)?

    Merely deactivating and reactivating the plugin normally wouldn’t mess up the code in that way because it doesn’t change the posts in the database.

    Thanks for the prompt answer.
    I’m using the Divi theme from Elegant Themes.
    Restarting from a clean backup and doing step by step testing:
    (+ I’m always using the text editor, never the Visual editor).
    With the last Divi theme version I see for instance this type of code:

    <div style="background-color: #00C3AA;"><span style="cursor: default;"><h3>line1<br>line2<br>line3<br>line4</h3></span></div>

    Displayed again in the WP editor after saving the page to

    <div><a href=""><span>

    such transformation did not occurred in previous versions of Divi.
    Shouldn’t [raw][/raw]prevent any modification of the code in the text editor (not the visual editor), even when displayed by the editor?
    I understand it is the same code internally but the second version is more difficult to maintain.
    See more details in this PDF file (that I also sent to Elegant Themes) and let me know what you think.

    + I tried again deactivating RAW HTML and reactivating it without being able to reproduce the issue.

    By curiosity, I disabled the visual editor in my WP account and was able to reproduce the corruption of all page contents located between [raw] [/raw] tags. The resulting page is completely destroyed when displayed in a browser.
    To reproduce it:
    with or without Divi
    Disabled the WP visual editor in your WP account

    In a text module, enter something like:

    <a href=""><span><h3>ZipMail<br>for<br>Microsoft</h3></span></a></div>

    update the module and save the page then the content is transformed into:


    as well as ALL other [raw][/raw] contents!!!

    This was all RAW Html options unchecked for this page.

    I tried checking them on by one (exclusively). Same issue.
    I tried checking all of them. Same issue.

    If you re-enable the visual editor in the WP user account, it restores the content OK (using the text editor, not the visual editor)

    Let me know what you think…

    Please find below the link to an image of the transformed html, because there was not way to display it properly in my previous post:

    I tested without Divi: same issue.
    If I re-enable the Visual editor in the user account, the code is displayed back OK.
    Looking forward for your feedback…

    Plugin Author Janis Elsts


    Good catch. I didn’t know that disabling the visual editor could affect the output in this way.

    Try the development version. It should fix this particular issue.

    Hi Janis, glad to have contributed to slightly improve Raw HTML and glad to see the “problem” should be solved in the development version.
    Regarding the development version, would you have quick release notes about the difference compared to the current version? I had a look at the readme but it is the same as the one of the current version. Would be curious to know before to install it.

    Plugin Author Janis Elsts


    There are only a couple of minor bug fixes in the development version. In addition to the patch for the issue you reported, it fixes one PHP warning and a “doing it wrong” API compatibility notice. The code that adds Raw HTML settings to the “Screen Options” panel has been slightly refactored.

    You could also look at the commit logs.

    Thanks very much Janis.

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘converted to <br> despite "Disable convert_chars" is checked’ is closed to new replies.