Changeset 44046 for branches/3.8/src/wp-includes/kses.php
- Timestamp:
- 12/13/2018 01:22:08 AM (6 years ago)
- Location:
- branches/3.8
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/3.8
- Property svn:mergeinfo changed
/branches/5.0 merged: 44014,44017
- Property svn:mergeinfo changed
-
branches/3.8/src/wp-includes/kses.php
r44018 r44046 491 491 */ 492 492 function wp_kses_one_attr( $string, $element ) { 493 $uris = array('xmlns', 'profile', 'href', 'src', 'cite', 'classid', 'codebase', 'data', 'usemap', 'longdesc', 'action');493 $uris = wp_kses_uri_attributes(); 494 494 $allowed_html = wp_kses_allowed_html( 'post' ); 495 495 $allowed_protocols = wp_allowed_protocols(); … … 661 661 662 662 /** 663 * Helper function listing HTML attributes containing a URL. 664 * 665 * This function returns a list of all HTML attributes that must contain 666 * a URL according to the HTML specification. 667 * 668 * This list includes URI attributes both allowed and disallowed by KSES. 669 * 670 * @link https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes 671 * 672 * @since 5.0.1 673 * 674 * @return array HTML attributes that must include a URL. 675 */ 676 function wp_kses_uri_attributes() { 677 $uri_attributes = array( 678 'action', 679 'archive', 680 'background', 681 'cite', 682 'classid', 683 'codebase', 684 'data', 685 'formaction', 686 'href', 687 'icon', 688 'longdesc', 689 'manifest', 690 'poster', 691 'profile', 692 'src', 693 'usemap', 694 'xmlns', 695 ); 696 697 /** 698 * Filters the list of attributes that are required to contain a URL. 699 * 700 * Use this filter to add any `data-` attributes that are required to be 701 * validated as a URL. 702 * 703 * @since 5.0.1 704 * 705 * @param array $uri_attributes HTML attributes requiring validation as a URL. 706 */ 707 $uri_attributes = apply_filters( 'wp_kses_uri_attributes', $uri_attributes ); 708 709 return $uri_attributes; 710 } 711 712 /** 663 713 * Callback for wp_kses_split. 664 714 * … … 852 902 $mode = 0; 853 903 $attrname = ''; 854 $uris = array('xmlns', 'profile', 'href', 'src', 'cite', 'classid', 'codebase', 'data', 'usemap', 'longdesc', 'action');904 $uris = wp_kses_uri_attributes(); 855 905 856 906 # Loop through the whole attribute list
Note: See TracChangeset
for help on using the changeset viewer.