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