| | 234 | /** |
| | 235 | * @ticket 22625 |
| | 236 | **/ |
| | 237 | |
| | 238 | function test_encodes_lone_anglebracket() { |
| | 239 | $inputs = array( |
| | 240 | 'This is < That. <blockquote>foo</blockquote> Text <a href="#">link</a>. Post-link text.', |
| | 241 | 'This is <blockquote>foo</blockquote> < that.', |
| | 242 | 'This is <blockquote>foo < bar</blockquote> that.', |
| | 243 | '< blockquote > < foo < blockquote >', |
| | 244 | ); |
| | 245 | $expected = array( |
| | 246 | 'This is < That. <blockquote>foo</blockquote> Text <a href="#">link</a>. Post-link text.', |
| | 247 | 'This is <blockquote>foo</blockquote> < that.', |
| | 248 | 'This is <blockquote>foo < bar</blockquote> that.', |
| | 249 | '< blockquote > < foo < blockquote >', |
| | 250 | ); |
| | 251 | |
| | 252 | foreach ( $inputs as $key => $input ) { |
| | 253 | $this->assertEquals( $expected[$key], balanceTags( $inputs[$key], true ) ); |
| | 254 | } |
| | 255 | } |
| | 256 | |