Changeset 44035 for branches/4.4/src/wp-includes/kses.php
- Timestamp:
- 12/13/2018 12:58:21 AM (5 years ago)
- Location:
- branches/4.4
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/4.4
- Property svn:mergeinfo changed
/branches/5.0 merged: 44014,44017
- Property svn:mergeinfo changed
-
branches/4.4/src/wp-includes/kses.php
r44003 r44035 536 536 */ 537 537 function wp_kses_one_attr( $string, $element ) { 538 $uris = array('xmlns', 'profile', 'href', 'src', 'cite', 'classid', 'codebase', 'data', 'usemap', 'longdesc', 'action');538 $uris = wp_kses_uri_attributes(); 539 539 $allowed_html = wp_kses_allowed_html( 'post' ); 540 540 $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 * … … 930 980 $mode = 0; 931 981 $attrname = ''; 932 $uris = array('xmlns', 'profile', 'href', 'src', 'cite', 'classid', 'codebase', 'data', 'usemap', 'longdesc', 'action');982 $uris = wp_kses_uri_attributes(); 933 983 934 984 // Loop through the whole attribute list
Note: See TracChangeset
for help on using the changeset viewer.