开发者

Allow HTML in TextArea

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_set开发者_如何学运维tings (stripslashes($value['id'])); ?>
   </textarea>


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>
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜