I tried to include shortcodes with a parameter in raw html output, like shown below:
<a href="https://example.com/folder/edit.php?action=someaction&id=[foocode parameter="value"]&edittoken=[foocode parameter="othervalue"]">linktext</a>
This crashes the PHP function do_shortcode()
.
Is stuff like this really not possible with shortcodes?
The method description itself contains a warning:
Users with
unfiltered_html
* capability may get unexpected output if
angle braces are nested in tags.
However, PHP crashing is not the kind of unexpected output that should be able to happen.
PS: The function that is being called is
function echocode( $atts ){
return "Hello World";
}
and added as
add_shortcode("foocode", "echocode");
The function never runs. (No starting echocode is being printed)