Fixed $formAction in quick_reply will not accept extra query-string parameters

Jon W

Well-known member
The quick_reply template uses the $formAction variable to determine where the form is sent to.

Due to the way that the <xen:set> function works, it is not possible to set it to be a link with any extra query-string parameters because & is replaced with &nbsp;.

One solution would be to replace:
HTML:
    <form action="{$formAction}" method="post" class="AutoValidator blendedEditor" data-optInOut="OptIn" id="QuickReply">
with:
HTML:
    <form action="{xen:raw $formAction}" method="post" class="AutoValidator blendedEditor" data-optInOut="OptIn" id="QuickReply">

Alternatively, it may be that the <xen:set> function could be changed -- I can't quite tell if this is as designed.
 
It's not xen:set per se. xen:link exports them encoded which causes double encoding here. However, xen:raw is something we usually use sparingly -- when we do use it, you'll usually see that the variable has "html" in its name to indicate that it will be used raw.

However, the workaround here is to use {xen:escape $formAction, false} which escapes, but prevents double escaping.
 
Top Bottom