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