Changeset 44023 for branches/4.8/src/wp-includes/kses.php
- Timestamp:
- 12/13/2018 12:32:59 AM (6 years ago)
- Location:
- branches/4.8
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/4.8
- Property svn:mergeinfo changed
/branches/5.0 merged: 44014,44017
- Property svn:mergeinfo changed
-
branches/4.8/src/wp-includes/kses.php
r43999 r44023 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(); … … 736 736 737 737 /** 738 * Helper function listing HTML attributes containing a URL. 739 * 740 * This function returns a list of all HTML attributes that must contain 741 * a URL according to the HTML specification. 742 * 743 * This list includes URI attributes both allowed and disallowed by KSES. 744 * 745 * @link https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes 746 * 747 * @since 5.0.1 748 * 749 * @return array HTML attributes that must include a URL. 750 */ 751 function wp_kses_uri_attributes() { 752 $uri_attributes = array( 753 'action', 754 'archive', 755 'background', 756 'cite', 757 'classid', 758 'codebase', 759 'data', 760 'formaction', 761 'href', 762 'icon', 763 'longdesc', 764 'manifest', 765 'poster', 766 'profile', 767 'src', 768 'usemap', 769 'xmlns', 770 ); 771 772 /** 773 * Filters the list of attributes that are required to contain a URL. 774 * 775 * Use this filter to add any `data-` attributes that are required to be 776 * validated as a URL. 777 * 778 * @since 5.0.1 779 * 780 * @param array $uri_attributes HTML attributes requiring validation as a URL. 781 */ 782 $uri_attributes = apply_filters( 'wp_kses_uri_attributes', $uri_attributes ); 783 784 return $uri_attributes; 785 } 786 787 /** 738 788 * Callback for wp_kses_split. 739 789 * … … 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.