Skip to:
Content
Pages
Categories
Search
Top
Bottom

how do i allow HTML in xprofle fields


  • coolhunt
    Participant

    @coolhunt

    Hey Guys,

    Im trying to disable kses —
    Im the only one that will have access to adding profiles so Im pretty safe.

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

  • coolhunt
    Participant

    @coolhunt

    Hmm maybe I should just allow specific tags?

    Though I really want easy styling in the profile fields to prettify it


    coolhunt
    Participant

    @coolhunt

    This is what I have so far

    
    function gawd_allowed_tags() {
    
            global $allowedtags; 
    	$allowedtags = array(
    		'a' => array(
    			'class' => array(),
    			'href'  => array(),
    			'rel'   => array(),
    			'title' => array(),
    		),
    		'abbr' => array(
    			'title' => array(),
    		),
    		'b' => array(),
    		'blockquote' => array(
    			'cite'  => array(),
    		),
    		'cite' => array(
    			'title' => array(),
    		),
    		'code' => array(),
    		'del' => array(
    			'datetime' => array(),
    			'title' => array(),
    		),
    		'dd' => array(),
    		'div' => array(
    			'class' => array(),
    			'title' => array(),
    			'style' => array(),
    		),
    		'dl' => array(),
    		'dt' => array(),
    		'em' => array(),
    		'h1' => array(),
    		'h2' => array(),
    		'h3' => array(),
    		'h4' => array(),
    		'h5' => array(),
    		'h6' => array(),
    		'i' => array(),
    		'img' => array(
    			'alt'    => array(),
    			'class'  => array(),
    			'height' => array(),
    			'src'    => array(),
    			'width'  => array(),
    		),
    		'li' => array(
    			'class' => array(),
    		),
    		'ol' => array(
    			'class' => array(),
    		),
    		'p' => array(
    			'class' => array(),
    		),
    		'q' => array(
    			'cite' => array(),
    			'title' => array(),
    		),
    		'span' => array(
    			'class' => array(),
    			'title' => array(),
    			'style' => array(),
    		),
    		'strike' => array(),
    		'strong' => array(),
    		'ul' => array(
    			'class' => array(),
    		),
    	);
    	
    	return allowedtags;
    }
    
    add_action('init', 'gawd_allowed_tags', 10);
    ?>
    
Viewing 2 replies - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.
Skip to toolbar