Title: bug in wp-syntax/wp-syntax.php breaks highlight
Last modified: August 20, 2016

---

# bug in wp-syntax/wp-syntax.php breaks highlight

 *  Resolved [JesseHawkins](https://wordpress.org/support/users/jessehawkins/)
 * (@jessehawkins)
 * [13 years, 7 months ago](https://wordpress.org/support/topic/bug-in-wp-syntaxwp-syntaxphp-breaks-highlight/)
 * 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.

Viewing 1 replies (of 1 total)

 *  Plugin Author [Steven](https://wordpress.org/support/users/shazahm1hotmailcom/)
 * (@shazahm1hotmailcom)
 * [13 years, 4 months ago](https://wordpress.org/support/topic/bug-in-wp-syntaxwp-syntaxphp-breaks-highlight/#post-3116869)
 * **[@jessehawkins](https://wordpress.org/support/users/jessehawkins/)**
 * I’ve corrected this error in the forthcoming bug fix release.

Viewing 1 replies (of 1 total)

The topic ‘bug in wp-syntax/wp-syntax.php breaks highlight’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/wp-syntax_f8f6f6.svg)
 * [WP-Syntax](https://wordpress.org/plugins/wp-syntax/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/wp-syntax/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/wp-syntax/)
 * [Active Topics](https://wordpress.org/support/plugin/wp-syntax/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/wp-syntax/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/wp-syntax/reviews/)

 * 1 reply
 * 2 participants
 * Last reply from: [Steven](https://wordpress.org/support/users/shazahm1hotmailcom/)
 * Last activity: [13 years, 4 months ago](https://wordpress.org/support/topic/bug-in-wp-syntaxwp-syntaxphp-breaks-highlight/#post-3116869)
 * Status: resolved