cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Donald Ball <ba...@webslingerZ.com>
Subject sitemap urlencoding subst patch
Date Tue, 19 Mar 2002 05:57:37 GMT
in a c2 project i'm working on, we're using the request parameter matcher
to match values that we then use in the generator's source url:

<map:match pattern="nlm/query">
  <map:match type="request" pattern="author">
    <map:generate src="http://www.ncbi.nlm.nih.gov/entrez/utils/pmqty.fcgi?db=PubMed&amp;mode=XML&amp;dispmax=999&amp;term={1}[au]"/>
    <map:serialize/>
  </map:match>
</map:match>

problem was, the request parameter could contain spaces and other fun
characters, and the value wasn't being urlencoded. i've attached a patch
for the sitemap which adds urlencoding to the subst method, but i don't
know that that's appropriate for all cases. can y'all think of anything
this would break?

- donald

Mime
View raw message