Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Index: mtm-tag-admin.php
- ===================================================================
- --- mtm-tag-admin.php (revision 6)
- +++ mtm-tag-admin.php (working copy)
- @@ -20,7 +20,11 @@
- }
- //go through all non-empty values and wp_kses it
- foreach( $values as $k => $v ){
- - $values[$k] = wp_kses(wp_unslash($v), array());
- + if( $k == 'content'){
- + $values[$k] = wp_unslash($v);
- + }else{
- + $values[$k] = wp_kses(wp_unslash($v), array());
- + }
- }
- //now pass cleaned values to parent constructor
- parent::__construct($values);
- Index: mtm-tag.php
- ===================================================================
- --- mtm-tag.php (revision 4)
- +++ mtm-tag.php (working copy)
- @@ -22,7 +22,12 @@
- public function output(){
- $tag_string = '<meta '.esc_attr($this->type).'="'.esc_attr($this->value).'"';
- if( $this->has_content() ){
- - $tag_string .= ' content="'.esc_attr($this->content).'"';
- + if( $this->type == 'http-equiv' && $this->value == 'Link' ){
- + //escape the attribute but allow for the <url>; format to pass through
- + $tag_string .= ' content="'.preg_replace('/<(.+)>;/', '<$1>;', esc_attr($this->content)).'"';
- + }else{
- + $tag_string .= ' content="'.esc_attr($this->content).'"';
- + }
- }
- $tag_string .= ' />';
- return $tag_string;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement