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.

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?

Yves
 
--
XMLmind XML Editor Support List
[email protected]
http://www.xmlmind.com/mailman/listinfo/xmleditor-support

Reply via email to