ChrisTERiS Posted January 20, 2021 Share Posted January 20, 2021 Hello all, For some reason the pattern that I'm using in an input in footer.tpl breaks the page: <input pattern="[a-z0-9._%+-]+@[a-z0-9.-]+\.[a-z]{2,}$" type="email" name="email" id="email" class="field form-control" placeholder="Email Address" required> If i remove the pattern part it works fine. The strange is that in a sidebar widget the exact same code works fine. Any idea? Thank you Chris 0 Quote Link to comment Share on other sites More sharing options...
string Posted January 20, 2021 Share Posted January 20, 2021 (edited) <input pattern="{literal}[a-z0-9._%+-]+@[a-z0-9.-]+\.[a-z]{2,}${/literal}" type="email" name="email" id="email" class="field form-control" placeholder="Email Address" required> Please try this. Here is the excerpt from the Smarty documentation explaining what literal does: Quote {literal} tags allow a block of data to be taken literally. This is typically used around Javascript or stylesheet blocks where {curly braces} would interfere with the template delimiter syntax. Anything within {literal}{/literal} tags is not interpreted, but displayed as-is. Edited January 20, 2021 by string Dont wrap whole input into literal 1 Quote Link to comment Share on other sites More sharing options...
ChrisTERiS Posted January 20, 2021 Author Share Posted January 20, 2021 @string Thank you very much. I'm using literal tags for more than 10 years, there are already many calls is some js code in footer.tpl, but honestly never thought that it can be the reason of this issue. Even if at some point I gave a look there to see if there is any { or } symbol that may break the template. But really it was this. Now works fine. Thank you again 0 Quote Link to comment Share on other sites More sharing options...
string Posted January 20, 2021 Share Posted January 20, 2021 🙂 I guess its the "$" what causes the issue. 1 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.