Ticket #35877: 35877.diff
| File 35877.diff, 2.9 KB (added by , 10 years ago) |
|---|
-
wp-includes/kses.php
551 551 $allowed_protocols = wp_allowed_protocols(); 552 552 $string = wp_kses_no_null( $string, array( 'slash_zero' => 'keep' ) ); 553 553 $string = wp_kses_js_entities( $string ); 554 554 555 555 // Preserve leading and trailing whitespace. 556 556 $matches = array(); 557 557 preg_match('/^\s*/', $string, $matches); … … 563 563 } else { 564 564 $string = substr( $string, strlen( $lead ), -strlen( $trail ) ); 565 565 } 566 566 567 567 // Parse attribute name and value from input. 568 568 $split = preg_split( '/\s*=\s*/', $string, 2 ); 569 569 $name = $split[0]; … … 600 600 $value = ''; 601 601 $vless = 'y'; 602 602 } 603 603 604 604 // Sanitize attribute by name. 605 605 wp_kses_attr_check( $name, $value, $string, $vless, $element, $allowed_html ); 606 606 … … 1063 1063 } else { 1064 1064 $xhtml_slash = ''; 1065 1065 } 1066 1066 1067 1067 // Split it 1068 1068 $attrarr = wp_kses_hair_parse( $attr ); 1069 1069 if ( false === $attrarr ) { … … 1073 1073 // Make sure all input is returned by adding front and back matter. 1074 1074 array_unshift( $attrarr, $begin . $slash . $elname ); 1075 1075 array_push( $attrarr, $xhtml_slash . $end ); 1076 1076 1077 1077 return $attrarr; 1078 1078 } 1079 1079 … … 1716 1716 $allowed_attr = apply_filters( 'safe_style_css', array( 1717 1717 'background', 1718 1718 'background-color', 1719 1720 1719 'border', 1721 'border-width',1722 'border-color',1723 'border-style',1724 'border-right',1725 'border-right-color',1726 'border-right-style',1727 'border-right-width',1728 1720 'border-bottom', 1729 1721 'border-bottom-color', 1730 1722 'border-bottom-style', 1731 1723 'border-bottom-width', 1724 'border-collapse', 1725 'border-color', 1732 1726 'border-left', 1733 1727 'border-left-color', 1734 1728 'border-left-style', 1735 1729 'border-left-width', 1730 'border-right', 1731 'border-right-color', 1732 'border-right-style', 1733 'border-right-width', 1734 'border-spacing', 1735 'border-style', 1736 1736 'border-top', 1737 1737 'border-top-color', 1738 1738 'border-top-style', 1739 1739 'border-top-width', 1740 1741 'border-spacing', 1742 'border-collapse', 1740 'border-width', 1743 1741 'caption-side', 1744 1742 'clear', 1745 1743 'color', 1744 'cursor', 1745 'direction', 1746 'float', 1746 1747 'font', 1747 1748 'font-family', 1748 1749 'font-size', … … 1749 1750 'font-style', 1750 1751 'font-variant', 1751 1752 'font-weight', 1753 'height', 1752 1754 'letter-spacing', 1753 1755 'line-height', 1754 'text-decoration', 1755 'text-indent', 1756 'text-align', 1757 1758 'height', 1759 'min-height', 1760 'max-height', 1761 1762 'width', 1763 'min-width', 1764 'max-width', 1765 1756 'list-style-type', 1766 1757 'margin', 1767 'margin-right',1768 1758 'margin-bottom', 1769 1759 'margin-left', 1760 'margin-right', 1770 1761 'margin-top', 1771 1762 'max-height', 1763 'max-width', 1764 'min-height', 1765 'min-width', 1766 'overflow', 1772 1767 'padding', 1773 'padding-right',1774 1768 'padding-bottom', 1775 1769 'padding-left', 1770 'padding-right', 1776 1771 'padding-top', 1777 1778 'clear', 1779 'cursor', 1780 'direction', 1781 'float', 1782 'overflow', 1772 'text-align', 1773 'text-decoration', 1774 'text-indent', 1783 1775 'vertical-align', 1784 ' list-style-type',1776 'width', 1785 1777 ) ); 1786 1778 1787 1779 if ( empty($allowed_attr) )
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)