Visual Editor removes code wrapped in [sourcecode] short tag

  • Author
    Posts
  • #1142504

    rhyous
    Member

    Create a new Post.

    Enter the following:

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

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

    [sourcecode language="html"]

    hello world

    [/sourcecode]

    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 rhyous.wordpress.com.

    #1142717

    kardotim
    Member

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

    #1142756

    rhyous
    Member

    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 wordpress.com to host them myself (that an not allowing zip files).

    Anyway, I left my writing blog on WordPress.com (jabrambarneck.com) 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.
    http://jabrambarneck.wordpress.com/wp-admin/post.php?post=498

    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

    #1142766

    kardotim
    Member

    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.