Title: (WP 2.7.1) Warning: htmlspecialchars_decode() Error when posting source code
Last modified: August 19, 2016

---

# (WP 2.7.1) Warning: htmlspecialchars_decode() Error when posting source code

 *  Resolved [stein](https://wordpress.org/support/users/stein/)
 * (@stein)
 * [17 years, 4 months ago](https://wordpress.org/support/topic/wp-271-error-when-posting-source-code/)
 * Hello,
 * Since I updated to 2.7.1 I have no longer been able to post any source code without
   triggering an error; except by disabling the syntax highlighting plugin I use(
   Syntaxhighlighter). I tried other similar plugins to see if it was a plugin error
   but not even the 2-day-ago updated Syntaxhighlighter Plus worked.
 * The error appears when attempting to publish/save/preview any post containing[
   code] or [sourcecode] tags and this appears:
    ** Warning: htmlspecialchars_decode()
   expects parameter 1 to be string, NULL given in /home/iniciat/public_html/main/
   wp-includes/compat.php on line 105
 * Warning: Cannot modify header information - headers already sent by (output started
   at /home/iniciat/public_html/main/wp-includes/compat.php:105) in /home/iniciat/
   public_html/main/wp-includes/pluggable.php on line 850
 * Any help will be very appreciated,
 * thanks

Viewing 5 replies - 1 through 5 (of 5 total)

 *  [iridiax](https://wordpress.org/support/users/iridiax/)
 * (@iridiax)
 * [17 years, 4 months ago](https://wordpress.org/support/topic/wp-271-error-when-posting-source-code/#post-986151)
 * See: [How do I solve the Headers already sent warning problem?](http://codex.wordpress.org/FAQ_Troubleshooting#How_do_I_solve_the_Headers_already_sent_warning_problem.3F)
 *  Thread Starter [stein](https://wordpress.org/support/users/stein/)
 * (@stein)
 * [17 years, 4 months ago](https://wordpress.org/support/topic/wp-271-error-when-posting-source-code/#post-986154)
 * Thanks for pointing out a possible solution but the compat.php file is untouched
   from the original. I followed the steps in the link you posted to make sure there
   are no spaces or other code outside the PHP, but the error persists.
 *  Anonymous User 439586
 * (@anonymized-439586)
 * [17 years, 4 months ago](https://wordpress.org/support/topic/wp-271-error-when-posting-source-code/#post-986300)
 * Can confirm, exact the same behavior here.
    Wordpress 2.7.1, Syntaxhighlighter
   1.1.2
 * as deactivating the plugin helps, it doesn’t seem to be a problem of WP but of
   Syntaxhighlighter 🙁
 *  [MichaelH](https://wordpress.org/support/users/michaelh/)
 * (@michaelh)
 * [17 years, 4 months ago](https://wordpress.org/support/topic/wp-271-error-when-posting-source-code/#post-986301)
 * Looks like this bug…
 * [http://core.trac.wordpress.org/ticket/9090](http://core.trac.wordpress.org/ticket/9090)
 * [http://wordpress.org/support/topic/242653](http://wordpress.org/support/topic/242653)
 *  Thread Starter [stein](https://wordpress.org/support/users/stein/)
 * (@stein)
 * [17 years, 4 months ago](https://wordpress.org/support/topic/wp-271-error-when-posting-source-code/#post-986302)
 * Excellent, thanks MichaelH!
    This fixed it.

Viewing 5 replies - 1 through 5 (of 5 total)

The topic ‘(WP 2.7.1) Warning: htmlspecialchars_decode() Error when posting source
code’ is closed to new replies.

## Tags

 * [code](https://wordpress.org/support/topic-tag/code/)
 * [header](https://wordpress.org/support/topic-tag/header/)
 * [pluggable](https://wordpress.org/support/topic-tag/pluggable/)
 * [sourcecode](https://wordpress.org/support/topic-tag/sourcecode/)

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 5 replies
 * 4 participants
 * Last reply from: [stein](https://wordpress.org/support/users/stein/)
 * Last activity: [17 years, 4 months ago](https://wordpress.org/support/topic/wp-271-error-when-posting-source-code/#post-986302)
 * Status: resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
