Changeset 44043 for branches/4.1
- Timestamp:
- 12/13/2018 01:16:31 AM (7 years ago)
- Location:
- branches/4.1
- Files:
-
- 2 edited
-
. (modified) (1 prop)
-
src/wp-includes/kses.php (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
branches/4.1
- Property svn:mergeinfo changed
/branches/5.0 merged: 44014,44017
- Property svn:mergeinfo changed
-
branches/4.1/src/wp-includes/kses.php
r44013 r44043 532 532 */ 533 533 function wp_kses_one_attr( $string, $element ) { 534 $uris = array('xmlns', 'profile', 'href', 'src', 'cite', 'classid', 'codebase', 'data', 'usemap', 'longdesc', 'action');534 $uris = wp_kses_uri_attributes(); 535 535 $allowed_html = wp_kses_allowed_html( 'post' ); 536 536 $allowed_protocols = wp_allowed_protocols(); … … 725 725 726 726 /** 727 * Helper function listing HTML attributes containing a URL. 728 * 729 * This function returns a list of all HTML attributes that must contain 730 * a URL according to the HTML specification. 731 * 732 * This list includes URI attributes both allowed and disallowed by KSES. 733 * 734 * @link https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes 735 * 736 * @since 5.0.1 737 * 738 * @return array HTML attributes that must include a URL. 739 */ 740 function wp_kses_uri_attributes() { 741 $uri_attributes = array( 742 'action', 743 'archive', 744 'background', 745 'cite', 746 'classid', 747 'codebase', 748 'data', 749 'formaction', 750 'href', 751 'icon', 752 'longdesc', 753 'manifest', 754 'poster', 755 'profile', 756 'src', 757 'usemap', 758 'xmlns', 759 ); 760 761 /** 762 * Filters the list of attributes that are required to contain a URL. 763 * 764 * Use this filter to add any `data-` attributes that are required to be 765 * validated as a URL. 766 * 767 * @since 5.0.1 768 * 769 * @param array $uri_attributes HTML attributes requiring validation as a URL. 770 */ 771 $uri_attributes = apply_filters( 'wp_kses_uri_attributes', $uri_attributes ); 772 773 return $uri_attributes; 774 } 775 776 /** 727 777 * Callback for wp_kses_split. 728 778 * … … 915 965 $mode = 0; 916 966 $attrname = ''; 917 $uris = array('xmlns', 'profile', 'href', 'src', 'cite', 'classid', 'codebase', 'data', 'usemap', 'longdesc', 'action');967 $uris = wp_kses_uri_attributes(); 918 968 919 969 # Loop through the whole attribute list
Note: See TracChangeset
for help on using the changeset viewer.