Changeset 44044
- Timestamp:
- 12/13/2018 01:18:07 AM (5 years ago)
- Location:
- branches/4.0
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/4.0
- Property svn:mergeinfo changed
/branches/5.0 merged: 44014,44017
- Property svn:mergeinfo changed
-
branches/4.0/src/wp-includes/kses.php
r44015 r44044 498 498 */ 499 499 function wp_kses_one_attr( $string, $element ) { 500 $uris = array('xmlns', 'profile', 'href', 'src', 'cite', 'classid', 'codebase', 'data', 'usemap', 'longdesc', 'action');500 $uris = wp_kses_uri_attributes(); 501 501 $allowed_html = wp_kses_allowed_html( 'post' ); 502 502 $allowed_protocols = wp_allowed_protocols(); … … 691 691 692 692 /** 693 * Helper function listing HTML attributes containing a URL. 694 * 695 * This function returns a list of all HTML attributes that must contain 696 * a URL according to the HTML specification. 697 * 698 * This list includes URI attributes both allowed and disallowed by KSES. 699 * 700 * @link https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes 701 * 702 * @since 5.0.1 703 * 704 * @return array HTML attributes that must include a URL. 705 */ 706 function wp_kses_uri_attributes() { 707 $uri_attributes = array( 708 'action', 709 'archive', 710 'background', 711 'cite', 712 'classid', 713 'codebase', 714 'data', 715 'formaction', 716 'href', 717 'icon', 718 'longdesc', 719 'manifest', 720 'poster', 721 'profile', 722 'src', 723 'usemap', 724 'xmlns', 725 ); 726 727 /** 728 * Filters the list of attributes that are required to contain a URL. 729 * 730 * Use this filter to add any `data-` attributes that are required to be 731 * validated as a URL. 732 * 733 * @since 5.0.1 734 * 735 * @param array $uri_attributes HTML attributes requiring validation as a URL. 736 */ 737 $uri_attributes = apply_filters( 'wp_kses_uri_attributes', $uri_attributes ); 738 739 return $uri_attributes; 740 } 741 742 /** 693 743 * Callback for wp_kses_split. 694 744 * … … 882 932 $mode = 0; 883 933 $attrname = ''; 884 $uris = array('xmlns', 'profile', 'href', 'src', 'cite', 'classid', 'codebase', 'data', 'usemap', 'longdesc', 'action');934 $uris = wp_kses_uri_attributes(); 885 935 886 936 # Loop through the whole attribute list
Note: See TracChangeset
for help on using the changeset viewer.