• After going from the HTML wordpress editor to visual, he will delete this code:

    <xmp>
    <iframe src="https://example.com" ></iframe>
    </xmp>

    Why?Why?Why?

Viewing 5 replies - 1 through 5 (of 5 total)
  • <xmp> was deprecated in HTML 3.2 and is now obsolete.

    Thread Starter ogi22

    (@ogi22)

    Oh thanx.

    Is there another way to view long HTML code as text?
    Without having to replace the character after the character?

    Didn’t you use it in your question?
    <code>HTML code or PHP code or JS code...</code>

    Thread Starter ogi22

    (@ogi22)

    <code> </code> does not stop rendering HTML code in web browser.
    I tried.

    https://codepen.io/Ogi22/pen/XxGBvz

    • This reply was modified 6 years, 1 month ago by ogi22.
    • This reply was modified 6 years, 1 month ago by ogi22.

    I see. I was thinking that the < and > characters got converted, but they do not.

    Well, the editor keeps it when I use <xmp>, so it might be that your user does not have unfiltered_html capability, or that the filters have changed since version WP 4.7.11 (which is what my test site is running).
    Edit: But you really should not use deprecated HTML tags. There does not seem to be an equivalent, because <pre> and <code> still interpret the HTML, so you have to change all the characters yourself. It might be better for you to use a syntax highlighter plugin.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘After going from HTML to visual, it clears the code’ is closed to new replies.