3 users online. Create an account or sign in to join them.Users

Search

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

Use {$query:encoded} in the Dynamic DS :)

I knew it had to be that simple! Thanks!

Create an account or sign in to comment.

Symphony • Open Source XSLT CMS

Server Requirements

  • PHP 5.2 or above
  • PHP's LibXML module, with the XSLT extension enabled (--with-xsl)
  • MySQL 5.0 or above
  • An Apache or Litespeed webserver
  • Apache's mod_rewrite module or equivalent

Compatible Hosts

Sign in

Login details