Forums

WP-Syntax
JavaScript Operators Get Converted into HTML Entities - The Fix (2 posts)

  1. coolbloke1324
    Member
    Posted 11 months ago #

    When outputting < and > as well as some other opertators, the wordpress editor alters the output to display the html entities version of the code instead of the actual code so you end up with things like a for loop that looks like this:

    for (var i = 0; i < 10; i++) { }

    Which will obviously break when you copy it to a script!

    Please see my dev blog for how I fixed this:

    http://www.isogenicengine.com/2011/04/23/wp-syntax-plugin-javascript-operators/

    http://wordpress.org/extend/plugins/wp-syntax/

  2. coolbloke1324
    Member
    Posted 11 months ago #

    The above example altered my code lol. The for loop would have & lt ; instead of <.

Reply

You must log in to post.

About this Plugin

About this Topic