Issues with posting code in the improved editor (bug)

  • Unknown's avatar

    I have noticed an issue with the improved editor when attempting to post computer source code that is not present in the legacy editor (the one from wp-admin).

    In HTML tab of the improved editor, if I paste a block of code within nested pre and code tags that have XML comments, the block gets mangled when I switch to the visual tab. I know enough about web programming to understand what happened here.

    However, if I encode the block of code so that the greater than and less than characters are converted to their HTML equivalents and do the same thing, the block does not get mangled when switching to the visual tab.

    The problem arises when I switch to the HTML tab and back to the visual tab. The block becomes mangled as if I did not encode it. What is happening is when it goes from the visual tab to the HTML tab, the greater than and less than characters are not being encoded.

    If I go to the text tab of the legacy editor and do the same thing using the encoded block of code, I can repeatedly switch between the visual and text tabs without the block becoming mangled.

    The blog I need help with is: (visible only to logged in users)

  • Hi @dauvis, can you put up a pastebin or cloudup paste (or something similar) showing exactly what code you entered and what came up? I’ll check to see if there’s a bug report open on the issue you’re having; if not I’ll file one.

  • The topic ‘Issues with posting code in the improved editor (bug)’ is closed to new replies.