Embedded quotes break the shortcode
-
I’ve created the following shortcode:
[xilipostinpost query="tag=dossier" beforeeach="<div class='xi-item'>" aftereach="</div>"]
After saving end reopening the page, it comes out as either:
<div>[xilipostinpost query="dossier" beforeeach=" <div class="xi-item">" aftereach="</div> "]</div>
or:
<div>[xilipostinpost query="dossier" beforeeach="<div class="xi-item">" aftereach="</div> <p>"]</p></div>
or:
xilipostinpost query="dossier" beforeeach="<div class="xi-item">" aftereach="</div>"
or:
<p>xilipostinpost query="dossier" beforeeach="</p> <div class="xi-item">" aftereach="</div> <p>"</p>
None of these work as intended, effectively breaking the layout. The problem seems to originate at the embedded single quotes. Is it possible to add an extra parameter to add html attributes json style? Like so:
beforeeach = "div" beforeeachatt = "class":"xili-item","style":"color:blue"
That would prevent the need for embedded quotes.
- The topic ‘Embedded quotes break the shortcode’ is closed to new replies.