Question

I'm building a custom options panel in Wordpress. One of the options I'd like to offer is the ability to add text and html to the footer. I can enter simple tags like, bold - but when you add a URL crazy stuff happens. I did some googling and found "stripslashes", alas that doesn't work either.

The code below is part of a giant case statement.

   <textarea cols="70" rows="5" name="<?php echo $value['id']; ?>" class="ainput" id="<?php echo $value['id']; ?>" type="<?php echo $value['type']; ?>" />
      <?php echo get_settings (stripslashes($value['id'])); ?>
   </textarea>
Was it helpful?

Solution

Figured it out. STRIPSLASHES needs to first!

<textarea cols="70" rows="5" name="<?php echo $value['id']; ?>" class="ainput" id="<?php echo $value['id']; ?>" type="<?php echo $value['type']; ?>" />
          <?php echo stripslashes(get_settings($value['id'])); ?>
</textarea>
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top