WordPress.org

Ready to get started?Download WordPress

Forums

SyntaxHighlighter Evolved
Serious flaw with HTML and syntax highlighter. (5 posts)

  1. Geoffrey Liu
    Member
    Posted 8 months ago #

    In WP 3.7.1, there is a serious flaw. The shortcode does not support HTML very well.

    For example, if we type the following in to Visual editor:

    [code language="html"]
    
    <input type="checkbox" id="cbox1" />
    <label for="cbox1">Option 1</label>
    <input type="checkbox" id="cbox2" />
    <label for="cbox2">Option 2</label>
    <!-- ...and so on -->
    
    [/code]

    [Moderator Note: Please post code & markup between backticks or use the code button - not the blockwquote button. Your posted code may now have been permanently damaged by the forum's parser.]

    The output is such:

    & lt ;blockquote>& lt ;input type="checkbox" id="cbox1" /& gt ;
    & lt ; label for="cbox1" & gt ; Option 1 & lt ; /label & gt;
    & lt ;input type="checkbox" id="cbox2" /& gt ;
    & lt ;label for="cbox2"& gt ;Option 2& lt ;/label& gt ;
    <!-- ...and so on -->

    It appears that the plugin is printing the escape sequences for the HTML characters.

    http://wordpress.org/plugins/syntaxhighlighter/

  2. Geoffrey Liu
    Member
    Posted 8 months ago #

    as WordPress support forums seem to have a hard time with escape sequences, here's what it looks like in a picture.

    http://i.imgur.com/F8er526.png

    Update:</b> Very strange. It seems that the issue is confined only to preview mode. When I hit "publish", it displays as normal.

  3. Wil
    Member
    Posted 7 months ago #

    I have the same issue.

    http://screencast.com/t/y5FCxmJqsh

    Only option for me is to edit the post in Text mode

  4. deadlydog
    Member
    Posted 5 months ago #

    I am having the same issue too when posting code from Windows Live Writer using the Source Code Highlighter Plugin for WordPress.com plugin (http://richhewlett.com/wlwsourcecodeplugin/). This worked fine in the past, and only recently started converting things like double quotes to "&. Solution for me to use edit the post in the WordPress editor right on the site and convert the characters back to what they should be.

  5. deadlydog
    Member
    Posted 5 months ago #

    I hate to say it, but this bug is serious enough to make me switch syntax highlighters. Anytime I post HTML, XML, XAML, or any other language that uses the less-than/greater-than signs or double quotes, I have to go in and manually edit all of those code samples again directly on the WordPress site in Text mode. Looks like this product hasn't seen an update in 9 months. I hope it's not dead, as I really like SyntaxHighlighter Evolved :(

Reply

You must log in to post.

About this Plugin

About this Topic