homepage Welcome to WebmasterWorld Guest from 54.204.127.191
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member

Home / Forums Index / Code, Content, and Presentation / PHP Server Side Scripting
Forum Library, Charter, Moderators: coopster & jatar k

PHP Server Side Scripting Forum

    
Encode html code in [textfield] Meta Box Wordpress
kaufenpreis




msg:4673543
 4:23 pm on May 22, 2014 (gmt 0)

I've been building a custom plugin for creating a custom meta box

I have a problem now, whenever I put html code inside the textfield, it doesn't detect the code, I can't find any answer so far here, if you know how to deal with this please let me know

here is my code for displaying metabox in the post:
...<p>
<label for="meta-textarea" class="prfx-row-title"><?php _e( 'Short Bio', 'prfx-textdomain' )?></label>
<textarea name="meta-textarea" id="meta-textarea"><?php if ( isset ( $prfx_stored_meta['meta-textarea'] ) ) echo $prfx_stored_meta['meta-textarea'][0]; ?></textarea>
</p>

 

penders




msg:4674173
 11:41 am on May 24, 2014 (gmt 0)

What are you trying to achieve? A WYSIWYG type editor?

html code inside the textfield, it doesn't detect the code


Yes, textarea's are for text/plain content. Any HTML inside the textarea will not be interpreted by the browser. But it is also invalid to include HTML inside the textarea - it must be converted to HTML entities (which you seem to suggest you are doing already by your title). But if an HTML element is converted to HTML entities then it's no longer an HTML element.

Global Options:
 top home search open messages active posts  
 

Home / Forums Index / Code, Content, and Presentation / PHP Server Side Scripting
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved