Title: HTML Code Inside Theme Option Input Fields?
Last modified: August 19, 2016

---

# HTML Code Inside Theme Option Input Fields?

 *  Resolved [norbiu](https://wordpress.org/support/users/norbiu/)
 * (@norbiu)
 * [16 years, 1 month ago](https://wordpress.org/support/topic/html-code-inside-theme-option-input-fields/)
 * I’m trying to add some simple html code inside one of the inputs of a theme option:
 * `<span class="abc">`
 * I can add it without the quotes, and it works, but it doesn’t validate. Any ideas?

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

 *  [Mark / t31os](https://wordpress.org/support/users/t31os_/)
 * (@t31os_)
 * [16 years, 1 month ago](https://wordpress.org/support/topic/html-code-inside-theme-option-input-fields/#post-1477413)
 * Try single quotes? Or try escaping the quotes..
 *     ```
       <span class='abc'>
       ```
   
 *     ```
       <span class=\"abc\">
       ```
   
 *  Thread Starter [norbiu](https://wordpress.org/support/users/norbiu/)
 * (@norbiu)
 * [16 years, 1 month ago](https://wordpress.org/support/topic/html-code-inside-theme-option-input-fields/#post-1477428)
 * I used stripslashes for calling the info from the theme options
 *     ```
       <?php
         global $options;
         foreach ($options as $value) {
           if (stripslashes(get_option( $value['id'] )) === FALSE) { $$value['id'] = $value['std']; }
           else { $$value['id'] = stripslashes(get_option( $value['id'] )); }
           }
       ?>
       ```
   
 * and htmlspecialchars() for the value of the input inside the options.

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

The topic ‘HTML Code Inside Theme Option Input Fields?’ is closed to new replies.

## Tags

 * [html](https://wordpress.org/support/topic-tag/html/)
 * [slashes](https://wordpress.org/support/topic-tag/slashes/)
 * [wordpress options](https://wordpress.org/support/topic-tag/wordpress-options/)

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 2 replies
 * 2 participants
 * Last reply from: [norbiu](https://wordpress.org/support/users/norbiu/)
 * Last activity: [16 years, 1 month ago](https://wordpress.org/support/topic/html-code-inside-theme-option-input-fields/#post-1477428)
 * Status: resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
