From 6d05c57881ca1c26ea6a1bfd89cc8eb6edab297b Mon Sep 17 00:00:00 2001 From: Sam Minnee Date: Mon, 22 Jun 2015 09:44:00 +0100 Subject: [PATCH] Ensure that shortcodes inside script tags are parsed. Fixes #4332. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The problem is that the marker images aren’t picked up by DOMDocument if they are inserted into a ', + $this->parser->parse('') + ); + } + + public function testNumericShortcodes() { + $this->assertEqualsIgnoringWhitespace( + '[2]', + $this->parser->parse('[2]') + ); + $this->assertEqualsIgnoringWhitespace( + '', + $this->parser->parse('') + ); + + $this->parser->register('2', function($attributes, $content, $this, $tag, $extra) { + return 'this is 2'; + }); + + $this->assertEqualsIgnoringWhitespace( + 'this is 2', + $this->parser->parse('[2]') + ); + $this->assertEqualsIgnoringWhitespace( + '', + $this->parser->parse('') + ); + } + public function testExtraContext() { $this->parser->parse('Test');