WordPress.org

Ready to get started?Download WordPress

Forums

Crayon Syntax Highlighter
Incorrect display of double quotes HTML entity (4 posts)

  1. Gabriele Romanato
    Member
    Posted 2 years ago #

    There's a problem with the handling of the " HTML entity. Either you choose to expand it in HTML attributes or not, this entity is displayed as such on posts (not expanded as ", as expected).

    To fix this problem (quick & dirty), go to line 173 of the crayon_highlighter.class.php class file and add the following code:

    $code = str_replace('"', '"', $code);

    Hope that helps.

    http://wordpress.org/extend/plugins/crayon-syntax-highlighter/

  2. akarmenia
    Member
    Plugin Author

    Posted 2 years ago #

    I can't seem to reproduce this bug, could you send a screenshot? I should have handled the quotes with the encode and decode functions in PHP which do essentially the same thing.

  3. Gabriele Romanato
    Member
    Posted 2 years ago #

    An HTML element which should be displayed as <div class="test"/> is displayed as <div class=equot;testequot;/> instead. This is the problem, which can be easily fixed by adding the above snippet. Simply put, the equot; entity is handled as eamp;quot; by your code.

  4. akarmenia
    Member
    Plugin Author

    Posted 2 years ago #

    Hmm, if you're using the Tag Editor it should automatically add a decode:true or decode:1 into the class of the pre tag, which will decode the " into a " before highlighting. Could you show the Crayon tag you're using from the HTML editor of the post editor?

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic