[resolved] bug in wp-syntax/wp-syntax.php breaks highlight (2 posts)

  1. JesseHawkins
    Posted 3 years ago #

    I am able to see the highlight feature work when I preview a post, however each time I switch between HTML and Visual editing, the highlight code is removed. After a little digging, I believe I found the source of the problem in wp-syntax/wp-syntax.php:

    function wp_syntax_change_mce_options($init) {
        $ext = 'pre[id|name|class|style|lang|line|escaped|hightlight|src]';
        if ( isset($init["extended_valid_elements"]) )
            $init["extended_valid_elements"] .= "," . $ext;
        } else {
            $init["extended_valid_elements"] = $ext;
        return $init;

    Specifically, highlight is mispelled "hightlight". I verified that adding the same misspelling, hightlight, to the pre tag would persist between mode switches, however it would not actually trigger the highlight feature.

    Hope that this helps.

    Edit: typos and grammar.

  2. shazahm1
    Plugin Author

    Posted 3 years ago #


    I've corrected this error in the forthcoming bug fix release.

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • WP-Syntax
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic