|
@@ 60-62 (lines=3) @@
|
| 57 |
|
// Just blank attributes without any attributes are cleaned up. |
| 58 |
|
$pattern = '/<(\w+)><\/\1>/im'; |
| 59 |
|
// Remove the pattern while it is found (match nested annotations). |
| 60 |
|
while ( 1 === preg_match( $pattern, $data['post_content'] ) ) { |
| 61 |
|
$data['post_content'] = preg_replace( $pattern, '$2', $data['post_content'], -1, $count ); |
| 62 |
|
} |
| 63 |
|
// Remove text annotations |
| 64 |
|
// <span class="textannotation" id="urn:enhancement-777cbed4-b131-00fb-54a4-ed9b26ae57ea">. |
| 65 |
|
|
|
@@ 72-74 (lines=3) @@
|
| 69 |
|
// to: |
| 70 |
|
$pattern = '/<(\w+)[^>]*\sclass=\\\"textannotation(?![^\\"]*\sdisambiguated)[^\\"]*\\\"[^>]*>(.*?)<\/\1>/im'; |
| 71 |
|
// Remove the pattern while it is found (match nested annotations). |
| 72 |
|
while ( 1 === preg_match( $pattern, $data['post_content'] ) ) { |
| 73 |
|
$data['post_content'] = preg_replace( $pattern, '$2', $data['post_content'], -1, $count ); |
| 74 |
|
} |
| 75 |
|
return $data; |
| 76 |
|
} |
| 77 |
|
|