3 users online. Create an account or sign in to join them.Users
Escaping a form input before it gets to the source paramter
This is an open discussion with 2 replies, filed under General.
Search
Use {$query:encoded} in the Dynamic DS :)
I knew it had to be that simple! Thanks!
Create an account or sign in to comment.
I have a simple form:
<form name="form_query" method="post" action=""> <input type="text" name="query" /> <input type="submit" name="submit" /> </form>To the page with the form I attached a dynamic xml source which takes {$query} as a parameter. The problem is when I submit a string with spaces the source fails to sumbit a request since the spaces are not escaped (when I manually put %20 for spaces it works well). What's the best way to escape it? I know about PHP rawurlencode() or JavaScript encodeURI() the question is where to put them?
Thank you