Visual Editor removes code wrapped in [sourcecode] short tag

  • Author
  • #1142504


    Create a new Post.

    Enter the following:

    [sourcecode language="html"]
    <p>hello world</p>

    Click on Visual Editor. Click back to Text editor. The <p> tags are removed and it looks as follows:

    [sourcecode language="html"]

    hello world


    More info: If I change it again in the text editor and go back and forth, it seems to then stay. However, if I leave editor and go back in, then switch, the bug happens again.

    The blog I need help with is



    What’s the link of the post you are referring to?



    I am not referring to a specific post. I am referring to all posts with code. This was the main reason I moved two of my blogs from to host them myself (that an not allowing zip files).

    Anyway, I left my writing blog on ( and just my luck I wanted to show some HTML for creating an epub and I ran into this bug again.

    I am referring to the act of writing a post. By the time I publish, I fix this bug but it takes time.

    I am currently writing this post but it isn’t public yet.

    Steps to reproduce:

    1. Start new post.
    2. Change to Text tab.
    3. Add sourcecode in tags.
    4. Change back to Visual tab.
    The bug should reproduce here.

    Note: If the bug doesn’t duplicate, then try this:
    5. Change to the Text tab.
    6. Save draft.
    7. Change back to the Visual Tab



    I’ve just reported this to our developers to look at. Thank you for the report.

The topic ‘Visual Editor removes code wrapped in [sourcecode] short tag’ is closed to new replies.