Home
Forums
New posts
Search forums
What's new
New posts
New media
New media comments
New resources
New profile posts
Latest activity
Media
New media
New comments
Search media
Resources
Latest reviews
Search resources
Members
Current visitors
New profile posts
Search profile posts
Log in
Register
What's new
Search
Search
Search titles only
By:
New posts
Search forums
Menu
Log in
Register
Install the app
Install
Home
Forums
XenForo bug reports
Bug reports
Unparsed tags render smilie replacement text in unknown tag options
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Reply to thread
Message
<blockquote data-quote="Xon" data-source="post: 1543128" data-attributes="member: 71874"><p>For example;</p><p>[plain]</p><p>[url unfurl="true" metadata="O_o123"]example.com[/url]</p><p>[/plain]</p><p>On edit is rendered as;</p><p>[plain]</p><p>[url unfurl="true" metadata="o_O123"]example.com[/url]</p><p>[/plain]</p><p></p><p>If the simile has multiple mappings, this may result in unexpected (and undesirable) changes to tag's option data.</p><p></p><p>The issue is in [ICODE]renderUnparsedTag[/ICODE] which uses [ICODE]renderString[/ICODE] without [ICODE]stopSmilies[/ICODE]/[ICODE]plain[/ICODE]/[ICODE]treatAsStructuredText[/ICODE] being set when rendering the tag.</p><p>[CODE="php"]public function renderUnparsedTag(array $tag, array $options)</p><p>{</p><p> return $this->renderString($tag['original'][0], $options)</p><p> . $this->renderSubTree($tag['children'], $options)</p><p> . $this->renderString($tag['original'][1], $options);</p><p>}[/CODE]</p><p></p><p>I think this would work as a fix in [ICODE]EditorHtml::renderUnparsedTag[/ICODE] or [ICODE]Html::renderUnparsedTag[/ICODE];</p><p>[CODE="php"]public function renderUnparsedTag(array $tag, array $options)</p><p>{</p><p> return $this->renderString($tag['original'][0], array_merge($options, ['plain' => true]))</p><p> . $this->renderSubTree($tag['children'], $options)</p><p> . $this->renderString($tag['original'][1], $options);</p><p>}[/CODE]</p></blockquote><p></p>
[QUOTE="Xon, post: 1543128, member: 71874"] For example; [plain] [url unfurl="true" metadata="O_o123"]example.com[/url] [/plain] On edit is rendered as; [plain] [url unfurl="true" metadata="o_O123"]example.com[/url] [/plain] If the simile has multiple mappings, this may result in unexpected (and undesirable) changes to tag's option data. The issue is in [ICODE]renderUnparsedTag[/ICODE] which uses [ICODE]renderString[/ICODE] without [ICODE]stopSmilies[/ICODE]/[ICODE]plain[/ICODE]/[ICODE]treatAsStructuredText[/ICODE] being set when rendering the tag. [CODE="php"]public function renderUnparsedTag(array $tag, array $options) { return $this->renderString($tag['original'][0], $options) . $this->renderSubTree($tag['children'], $options) . $this->renderString($tag['original'][1], $options); }[/CODE] I think this would work as a fix in [ICODE]EditorHtml::renderUnparsedTag[/ICODE] or [ICODE]Html::renderUnparsedTag[/ICODE]; [CODE="php"]public function renderUnparsedTag(array $tag, array $options) { return $this->renderString($tag['original'][0], array_merge($options, ['plain' => true])) . $this->renderSubTree($tag['children'], $options) . $this->renderString($tag['original'][1], $options); }[/CODE] [/QUOTE]
Insert quotes…
Verification
Post reply
Home
Forums
XenForo bug reports
Bug reports
Unparsed tags render smilie replacement text in unknown tag options
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.
Accept
Learn more…
Top