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