Shortcode parsed incorrectly because of heredoc

I have a post with something like this:

[code] $foo = <<<EOT   .... EOT; [/code] 

It gets converted to this by do_shortcodes_in_html_tags():

[code] $foo = <<<EOT   .... EOT; [/code&#q3; 

Therefore, the shortcode doesn't run. Is there a way to make this shortcode work correctly?


A workaround might be:

$foo = &lt;&lt;&lt;EOT

where we change <<< to &lt;&lt;&lt;. We could do this automatically before do_shortcode filters the content and then replace it again afterwards.

I tested this version:

$foo = <<<EOT

and it seems to parse the shortocde's content correctly. But then we would need to remove the extra <!----> part, after do_shortcode has filtered the content.

Category: shortcode Time: 2016-07-30 Views: 0
Tags: shortcode

Related post

iOS development

Android development

Python development

JAVA development

Development language

PHP development

Ruby development


Front-end development


development tools

Open Platform

Javascript development

.NET development

cloud computing


Copyright (C), All Rights Reserved.

processed in 0.103 (s). 12 q(s)