When I used Blogger, I was able to use HTML tags in certain fields like the blog’s title and description, post title, etc. This was certainly useful because for example, sometimes a description or title could use an
However in WordPress it does not seem to work; it escapes HTML tags for fields like that. I’ve looked through the code to try to figure out a way to work around this and managed to hack it, but would prefer to figure out a way to make it a plugin instead.
Currently, I edited
update_option in functions.php, commenting out
$newvalue = sanitize_option( $option, $newvalue );. This allows options to be updated in the database without first being escaped.
Then, I edited
get_bloginfo in general-template.php, changing the switch to have the 'description' case return $output instead of breaking and calling
apply_filters('bloginfo', $output, $show);. This prevents the output for display from being escaped.
Like I said, this works, but likely affects more than just the blog description, post title, etc. fields. Plus it makes updating WordPress more work.
Is there an easier way to control what fields are sanitized and/or escaped, and hopefully a way to make it a plugin? I’ve tried looking at using filters (for example analyzing a “remove filter from X plugin”), but could not figure it out.
Thanks a lot.