On 12/13/2011 04:43 PM, Yves Forkl wrote:
> I am using the webSearch command to send the currently selected characters to
> Richard Ishida's excellent Unicode String Analyser, with the following code
> in my configuration:
>
> <property name="WebSearch.searchers"><![CDATA[
> Unicode String Analyser
> http://people.w3.org/rishida/tools/analysestring/index.php?list=${searched}
> ]]></property>
>
> <command name="sendCharsToUnicodeStringAnalyser">
> <macro>
> <sequence>
> <get expression="$selectedChars"/>
> <set variable="chars" expression="%_" plainString="true" />
> <get expression="replace($chars, ' ', '%%20')"/>
> <command name="webSearch"
> parameter="[Unicode String Analyser] %_"/>
> </sequence>
> </macro>
> </command>
>
> <binding>
> <keyPressed code="F11" />
> <command name="sendCharsToUnicodeStringAnalyser"/>
> </binding>
>
> In fact, if you don't care about the space escaping problem, you even don't
> need the extra command and can simply use:
>
> <binding>
> <keyPressed code="F11" />
> <command name="webSearch" parameter="[Unicode String Analyser]"/>
> </binding>
>
> That is quite fine for character lookups.
Yes. The webSearch command automatically escapes the value of variables
such as ${searched} (otherwise the webSearch command would not work at all).
See
http://www.xmlmind.com/xmleditor/_distrib/doc/commands/declare_search_engines.html
>
> But it is impossible to send a single space to the Unicode String Analyser
> (yes, that's a real use case for us) because XXE seems to drop it, while a
> space between other characters is automatically escaped into "%20" as
> required.
>
> So now I tried to escape the space character myself using the above command,
> but had no success because XXE will of course re-escape my "%" into "%25".
> What can I do?
>
I'm really sorry but I don't see. The behaviour of webSearch seems well
adapted to the vast majority of use cases. That's why we are reluctant
to modify it.
--
XMLmind XML Editor Support List
[email protected]
http://www.xmlmind.com/mailman/listinfo/xmleditor-support