Changeset 44041 for branches/4.3/src/wp-includes/kses.php
- Timestamp:
- 12/13/2018 01:13:46 AM (6 years ago)
- Location:
- branches/4.3
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/4.3
- Property svn:mergeinfo changed
/branches/5.0 merged: 44014,44017
- Property svn:mergeinfo changed
-
branches/4.3/src/wp-includes/kses.php
r44005 r44041 533 533 */ 534 534 function wp_kses_one_attr( $string, $element ) { 535 $uris = array('xmlns', 'profile', 'href', 'src', 'cite', 'classid', 'codebase', 'data', 'usemap', 'longdesc', 'action');535 $uris = wp_kses_uri_attributes(); 536 536 $allowed_html = wp_kses_allowed_html( 'post' ); 537 537 $allowed_protocols = wp_allowed_protocols(); … … 733 733 734 734 /** 735 * Helper function listing HTML attributes containing a URL. 736 * 737 * This function returns a list of all HTML attributes that must contain 738 * a URL according to the HTML specification. 739 * 740 * This list includes URI attributes both allowed and disallowed by KSES. 741 * 742 * @link https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes 743 * 744 * @since 5.0.1 745 * 746 * @return array HTML attributes that must include a URL. 747 */ 748 function wp_kses_uri_attributes() { 749 $uri_attributes = array( 750 'action', 751 'archive', 752 'background', 753 'cite', 754 'classid', 755 'codebase', 756 'data', 757 'formaction', 758 'href', 759 'icon', 760 'longdesc', 761 'manifest', 762 'poster', 763 'profile', 764 'src', 765 'usemap', 766 'xmlns', 767 ); 768 769 /** 770 * Filters the list of attributes that are required to contain a URL. 771 * 772 * Use this filter to add any `data-` attributes that are required to be 773 * validated as a URL. 774 * 775 * @since 5.0.1 776 * 777 * @param array $uri_attributes HTML attributes requiring validation as a URL. 778 */ 779 $uri_attributes = apply_filters( 'wp_kses_uri_attributes', $uri_attributes ); 780 781 return $uri_attributes; 782 } 783 784 /** 735 785 * Callback for wp_kses_split. 736 786 * … … 927 977 $mode = 0; 928 978 $attrname = ''; 929 $uris = array('xmlns', 'profile', 'href', 'src', 'cite', 'classid', 'codebase', 'data', 'usemap', 'longdesc', 'action');979 $uris = wp_kses_uri_attributes(); 930 980 931 981 // Loop through the whole attribute list
Note: See TracChangeset
for help on using the changeset viewer.