Hi Marc,

I'm using Roxen 5.0.0

I might have found a bug in the emit sql plugin.

I use the folloming query:

<emit source="sql" query="SELECT replace(name,' ','&nbsp;') as name from
iitems;
" >
&_.name;
</emit>


The database gets!:

SELECT replace(name,' ',' ') as name from iitems;

How do you determine that the database gets that query?

How is this possible?

As far as I can tell the &nbsp; is transmitted as a non-breaking space (ASCII 160) in the query and the resulting variable seems to contain a non-breaking space as well. Try this and you should see that it is in fact correct:

<emit source="sql" query="SELECT REPLACE(name, ' ', '&nbsp;') AS name FROM ..." host="...">
    <p><replace from="&nbsp;" to="#">&_.name;</replace></p>
  </emit>


Cheers,

-- Jonas Walldén
   [EMAIL PROTECTED]

Reply via email to