Ticket #12394: kses.php.diff
File kses.php.diff, 1.0 KB (added by , 15 years ago) |
---|
-
kses.php
old new 538 538 # Is there a closing XHTML slash at the end of the attributes? 539 539 540 540 $xhtml_slash = ''; 541 if (preg_match('%\s /\s*$%', $attr))541 if (preg_match('%\s*/\s*$%', $attr)) 542 542 $xhtml_slash = ' /'; 543 543 544 544 # Are any attributes allowed at all for this element? … … 664 664 665 665 case 2 : # attribute value, a URL after href= for instance 666 666 667 if (preg_match(' /^"([^"]*)"(\s+|$)/', $attr, $match))667 if (preg_match('%^"([^"]*)"(\s+|/?$)%', $attr, $match)) 668 668 # "value" 669 669 { 670 670 $thisval = $match[1]; … … 680 680 break; 681 681 } 682 682 683 if (preg_match(" /^'([^']*)'(\s+|$)/", $attr, $match))683 if (preg_match("%^'([^']*)'(\s+|/?$)%", $attr, $match)) 684 684 # 'value' 685 685 { 686 686 $thisval = $match[1]; … … 696 696 break; 697 697 } 698 698 699 if (preg_match("%^([^\s\"']+)(\s+| $)%", $attr, $match))699 if (preg_match("%^([^\s\"']+)(\s+|/?$)%", $attr, $match)) 700 700 # value 701 701 { 702 702 $thisval = $match[1];