cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mustafa Yalniz <yal...@bumed.org.tr>
Subject Re: escaping characters
Date Wed, 23 Jul 2003 18:51:45 GMT

I get the info lets say lastname (Irish name could cause problem) from

   <lastname><sunshine:getxml context="request" 
path="/parameter/lastname"/></lastname>

and apply sunshine transformer.

later I insert it into the database as below.

         insert into user_tb
            set name = '<xsl:value-of select="name"/>',
               ...
                lastname = '<xsl:value-of select="lastname"/>'

And the lastname has syntax error in case last name is e.g. O'Reilly.

My question is is there a way in cocoon to process and replace the 
characters with escape ones.

Mustafa


At 14:34 23.07.2003 -0400, you wrote:





>This is not a cocoon issue so much as a database issue.  There is no one
>fix; see your database docs on how to escape single quotes for your
>database.  For Oracle, use two single quotes to get one single quote, e.g.
>       'it''s' will get saved in the database as the string "it's".
>
>-Christopher
>
>
>
>|---------+---------------------------->
>|         |           Mustafa Yalniz   |
>|         |           <yalniz@bumed.org|
>|         |           .tr>             |
>|         |                            |
>|         |           07/23/2003 01:27 |
>|         |           PM               |
>|         |           Please respond to|
>|         |           users            |
>|         |                            |
>|---------+---------------------------->
> 
>  >--------------------------------------------------------------------------------------------------------------|
>   | 
>                                         |
>   |       To:       users@cocoon.apache.org 
>                                         |
>   |       cc: 
>                                         |
>   |       Subject:  escaping 
> characters 
> |
> 
>  >--------------------------------------------------------------------------------------------------------------|
>
>
>
>
>Hi,
>
>I am trying to escape characters before saving it into the database. When
>the user enters something with apostrophe then it does not save it into the
>
>database since the first apostrophe is interpreted as end of entry. It is
>interpreted as syntax error.  Does anybody has any experience with this
>such as how to escape these special characters in cocoon before saving them
>
>into database.
>
>Thanks,
>Mustafa
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
>For additional commands, e-mail: users-help@cocoon.apache.org
>
>
>
>
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
>For additional commands, e-mail: users-help@cocoon.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


Mime
View raw message