Changeset 23729 for trunk/wp-includes/functions.php
- Timestamp:
- 03/16/2013 05:25:44 AM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-includes/functions.php
r23637 r23729 4021 4021 </div>' ) ); 4022 4022 } 4023 4024 /** 4025 * Return RegEx body to liberally match an opening HTML tag that: 4026 * 1. Is self-closing or 4027 * 2. Has no body but has a closing tag of the same name or 4028 * 3. Contains a body and a closing tag of the same name 4029 * 4030 * Note: this RegEx does not balance inner tags and does not attempt to produce valid HTML 4031 * 4032 * @since 3.6.0 4033 * 4034 * @param string $tag An HTML tag name. Example: 'video' 4035 * @return string 4036 */ 4037 function get_tag_regex( $tag ) { 4038 if ( empty( $tag ) ) 4039 return; 4040 4041 return sprintf( '(<%1$s[^>]*(?:/?>$|>[\s\S]*?</%1$s>))', tag_escape( $tag ) ); 4042 }
Note: See TracChangeset
for help on using the changeset viewer.