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

Search

Has anyone gotten around this problem of passing URL params through Symphony and retaining the spaces in them? All spaces are getting replaced by plus signs (+) which is screwing up our search results when we’re using dynamic XML data sources for search.

I feel like I’ve had this issue before but frankly at this point my brain is totally fried and I can’t remember anything about it.

@czheng: Is that through the DER extension?

No, just straight up.

URL-encoded spaces either become a + or a %20, you can’t circumvent that. What exactly is the problem with your dynamic XML data source?

Any parameters appended onto the URL of a Dynamic XML data source are URL encoded. If it’s causing a problem, you could URL decode them at the other end?

Switched to using GETs. There the space doesn’t get turned into a +

Although this thread is quite old, I recently ran into a similar problem and wanted to share my solution. I am using a url param to filter a DS. The interface is a search field, so I wanted to repopulate the field with the search param when the form is submitted.

The problem was when someone searched for a query with a special character the search field would then show the encoded query, i.e. a search for “Mary’s” would show “Mary%27s” in the search field.

The answer was to decode the param before re-populating the field. A google search turned up these two stylesheets for encoding and decoding URLs:

http://skew.org/xml/stylesheets/url-encode/

Attachments:
marys.jpg

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