You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@flex.apache.org by "Patil, Virat" <vi...@capgemini.com> on 2014/05/21 15:53:49 UTC

Replacing Apostrophe (')

Hello Guys

Is there way to replace apostrophe (') with html element
Example < is replaced with &lt;
Similarly I want it for '

Regards
Virat I Patil

This message contains information that may be privileged or confidential and is the property of the Capgemini Group. It is intended only for the person to whom it is addressed. If you are not the intended recipient, you are not authorized to read, print, retain, copy, disseminate, distribute, or use this message or any part thereof. If you receive this message in error, please notify the sender immediately and delete all copies of this message.

R: Replacing Apostrophe (')

Posted by Federico De Maddalena <f....@patente.it>.
Var strToReplace="...apostrophes...";
var pattern:RegExp=/'/gi;

strToReplace=strToReplace.replace(pattern, "&#39");

Or something like this

-----Messaggio originale-----
Da: Patil, Virat [mailto:virat.patil@capgemini.com] 
Inviato: mercoledì 21 maggio 2014 15:54
A: users@flex.apache.org
Oggetto: Replacing Apostrophe (')

Hello Guys

Is there way to replace apostrophe (') with html element Example < is replaced with &lt; Similarly I want it for '

Regards
Virat I Patil

This message contains information that may be privileged or confidential and is the property of the Capgemini Group. It is intended only for the person to whom it is addressed. If you are not the intended recipient, you are not authorized to read, print, retain, copy, disseminate, distribute, or use this message or any part thereof. If you receive this message in error, please notify the sender immediately and delete all copies of this message.

Re: Replacing Apostrophe (')

Posted by Chris Martin <wi...@gmail.com>.
umm, meant to take our your example.  Just checkout the encodedNode
variable :)  Ignore the xml above :)


On Wed, May 21, 2014 at 8:51 AM, Chris Martin <wi...@gmail.com> wrote:

> Sounds like you really need to properly encode the entire string so all
> special characters get encoded so it doesn't break the xml structure.
> Something like this would work.
>
> <node defaultTitle="ttes't title"></node>
>
> var encodedNode:String = "<node defaultTitle=" + new
> XMLNode(XMLNodeType.TEXT,"ttes't title").toString() + "></node>";
>
>
> On Wed, May 21, 2014 at 7:21 AM, Matthew Weir <ma...@yahoo.com>wrote:
>
>> You can try ' and just in case html interprets that... &apos ; but
>> together.
>>
>> http://msdn.microsoft.com/en-us/library/h0hw012b%28v=vs.110%29.aspx
>>
>> --------------------------------------------
>> On Wed, 5/21/14, Patil, Virat <vi...@capgemini.com> wrote:
>>
>>  Subject: RE: Replacing Apostrophe (')
>>  To: "users@flex.apache.org" <us...@flex.apache.org>
>>  Date: Wednesday, May 21, 2014, 7:14 AM
>>
>>  Thanks for the reply
>>  guys.
>>
>>  I have XML <node
>>  defaultTitle="ttes't
>>  title"></node>
>>
>>  This xml is used in querystring to store
>>  data.
>>
>>  As you can see the
>>  ' in the attribute the query fails. Is there a way to
>>  replace that.
>>
>>  -----Original
>>  Message-----
>>  From: Matthew Weir [mailto:mattcommark@yahoo.com]
>>
>>  Sent: Wednesday, May 21, 2014 7:36 PM
>>  To: users@flex.apache.org
>>  Subject: Re: Replacing Apostrophe (')
>>
>>  LOL, well that didn't
>>  work, it interpreted the HTML in the email, that was
>>  supposed to be & # 39 ;    but all together.
>>  --------------------------------------------
>>  On Wed, 5/21/14, Matthew Weir <ma...@yahoo.com>
>>  wrote:
>>
>>   Subject: Re:
>>  Replacing Apostrophe (')
>>   To: users@flex.apache.org
>>   Date: Wednesday, May 21, 2014, 7:01 AM
>>
>>   Try '
>>
>>
>>   http://www.asciitable.com/
>>
>>
>>
>>  --------------------------------------------
>>   On Wed, 5/21/14, Patil, Virat <vi...@capgemini.com>
>>   wrote:
>>
>>
>>  Subject: Replacing
>>   Apostrophe (')
>>    To: "users@flex.apache.org"
>>   <us...@flex.apache.org>
>>    Date: Wednesday, May 21, 2014, 6:53 AM
>>
>>    Hello Guys
>>
>>
>>    Is there
>>  way to replace apostrophe (')  with html element
>>    Example < is replaced
>>
>>  with <
>>    Similarly I want it for
>>   '
>>
>>
>>  Regards
>>    Virat I Patil
>>
>>
>>    This message contains information that
>>  may be  privileged or
>>    confidential and
>>  is the
>>   property of the Capgemini Group.
>>  It
>>    is
>>   intended only for
>>  the person to whom it is addressed. If
>>
>>  you are not the intended recipient, you are  not
>>  authorized
>>    to read, print, retain,
>>   copy, disseminate, distribute, or
>>    use this
>>   message or any
>>  part thereof. If you receive this
>>    message
>>  in error, please notify the sender  immediately and
>>    delete all copies of this
>>
>>  message.
>>
>>  This message contains
>>  information that may be privileged or confidential and is
>>  the property of the Capgemini Group. It is intended only for
>>  the person to whom it is addressed. If you are not the
>>  intended recipient, you are not authorized to read, print,
>>  retain, copy, disseminate, distribute, or use this message
>>  or any part thereof. If you receive this message in error,
>>  please notify the sender immediately and delete all copies
>>  of this message.
>>
>>
>

Re: Replacing Apostrophe (')

Posted by Chris Martin <wi...@gmail.com>.
Sounds like you really need to properly encode the entire string so all
special characters get encoded so it doesn't break the xml structure.
Something like this would work.

<node defaultTitle="ttes't title"></node>

var encodedNode:String = "<node defaultTitle=" + new
XMLNode(XMLNodeType.TEXT,"ttes't title").toString() + "></node>";


On Wed, May 21, 2014 at 7:21 AM, Matthew Weir <ma...@yahoo.com> wrote:

> You can try ' and just in case html interprets that... &apos ; but
> together.
>
> http://msdn.microsoft.com/en-us/library/h0hw012b%28v=vs.110%29.aspx
>
> --------------------------------------------
> On Wed, 5/21/14, Patil, Virat <vi...@capgemini.com> wrote:
>
>  Subject: RE: Replacing Apostrophe (')
>  To: "users@flex.apache.org" <us...@flex.apache.org>
>  Date: Wednesday, May 21, 2014, 7:14 AM
>
>  Thanks for the reply
>  guys.
>
>  I have XML <node
>  defaultTitle="ttes't
>  title"></node>
>
>  This xml is used in querystring to store
>  data.
>
>  As you can see the
>  ' in the attribute the query fails. Is there a way to
>  replace that.
>
>  -----Original
>  Message-----
>  From: Matthew Weir [mailto:mattcommark@yahoo.com]
>
>  Sent: Wednesday, May 21, 2014 7:36 PM
>  To: users@flex.apache.org
>  Subject: Re: Replacing Apostrophe (')
>
>  LOL, well that didn't
>  work, it interpreted the HTML in the email, that was
>  supposed to be & # 39 ;    but all together.
>  --------------------------------------------
>  On Wed, 5/21/14, Matthew Weir <ma...@yahoo.com>
>  wrote:
>
>   Subject: Re:
>  Replacing Apostrophe (')
>   To: users@flex.apache.org
>   Date: Wednesday, May 21, 2014, 7:01 AM
>
>   Try '
>
>
>   http://www.asciitable.com/
>
>
>
>  --------------------------------------------
>   On Wed, 5/21/14, Patil, Virat <vi...@capgemini.com>
>   wrote:
>
>
>  Subject: Replacing
>   Apostrophe (')
>    To: "users@flex.apache.org"
>   <us...@flex.apache.org>
>    Date: Wednesday, May 21, 2014, 6:53 AM
>
>    Hello Guys
>
>
>    Is there
>  way to replace apostrophe (')  with html element
>    Example < is replaced
>
>  with <
>    Similarly I want it for
>   '
>
>
>  Regards
>    Virat I Patil
>
>
>    This message contains information that
>  may be  privileged or
>    confidential and
>  is the
>   property of the Capgemini Group.
>  It
>    is
>   intended only for
>  the person to whom it is addressed. If
>
>  you are not the intended recipient, you are  not
>  authorized
>    to read, print, retain,
>   copy, disseminate, distribute, or
>    use this
>   message or any
>  part thereof. If you receive this
>    message
>  in error, please notify the sender  immediately and
>    delete all copies of this
>
>  message.
>
>  This message contains
>  information that may be privileged or confidential and is
>  the property of the Capgemini Group. It is intended only for
>  the person to whom it is addressed. If you are not the
>  intended recipient, you are not authorized to read, print,
>  retain, copy, disseminate, distribute, or use this message
>  or any part thereof. If you receive this message in error,
>  please notify the sender immediately and delete all copies
>  of this message.
>
>

RE: Replacing Apostrophe (')

Posted by Matthew Weir <ma...@yahoo.com>.
You can try &apos; and just in case html interprets that... &apos ; but together.

http://msdn.microsoft.com/en-us/library/h0hw012b%28v=vs.110%29.aspx

--------------------------------------------
On Wed, 5/21/14, Patil, Virat <vi...@capgemini.com> wrote:

 Subject: RE: Replacing Apostrophe (')
 To: "users@flex.apache.org" <us...@flex.apache.org>
 Date: Wednesday, May 21, 2014, 7:14 AM
 
 Thanks for the reply
 guys.
 
 I have XML <node
 defaultTitle="ttes't
 title"></node>
 
 This xml is used in querystring to store
 data.
 
 As you can see the
 ' in the attribute the query fails. Is there a way to
 replace that.
 
 -----Original
 Message-----
 From: Matthew Weir [mailto:mattcommark@yahoo.com]
 
 Sent: Wednesday, May 21, 2014 7:36 PM
 To: users@flex.apache.org
 Subject: Re: Replacing Apostrophe (')
 
 LOL, well that didn't
 work, it interpreted the HTML in the email, that was
 supposed to be & # 39 ;    but all together.
 --------------------------------------------
 On Wed, 5/21/14, Matthew Weir <ma...@yahoo.com>
 wrote:
 
  Subject: Re:
 Replacing Apostrophe (')
  To: users@flex.apache.org
  Date: Wednesday, May 21, 2014, 7:01 AM
  
  Try '
 
 
  http://www.asciitable.com/
  
  
 
 --------------------------------------------
  On Wed, 5/21/14, Patil, Virat <vi...@capgemini.com>
  wrote:
  
  
 Subject: Replacing
  Apostrophe (')
   To: "users@flex.apache.org"
  <us...@flex.apache.org>
   Date: Wednesday, May 21, 2014, 6:53 AM
   
   Hello Guys
  
  
   Is there
 way to replace apostrophe (')  with html element
   Example < is replaced
 
 with &lt;
   Similarly I want it for
  '
   
  
 Regards
   Virat I Patil
  
 
   This message contains information that
 may be  privileged or
   confidential and
 is the
  property of the Capgemini Group.
 It
   is
  intended only for
 the person to whom it is addressed. If
  
 you are not the intended recipient, you are  not
 authorized
   to read, print, retain,
  copy, disseminate, distribute, or
   use this
  message or any
 part thereof. If you receive this
   message
 in error, please notify the sender  immediately and
   delete all copies of this
 
 message.
  
 This message contains
 information that may be privileged or confidential and is
 the property of the Capgemini Group. It is intended only for
 the person to whom it is addressed. If you are not the
 intended recipient, you are not authorized to read, print,
 retain, copy, disseminate, distribute, or use this message
 or any part thereof. If you receive this message in error,
 please notify the sender immediately and delete all copies
 of this message.
 

RE: Replacing Apostrophe (')

Posted by "Patil, Virat" <vi...@capgemini.com>.
Thanks for the reply guys.

I have XML <node defaultTitle="ttes't title"></node>

This xml is used in querystring to store data.

As you can see the ' in the attribute the query fails. Is there a way to replace that.

-----Original Message-----
From: Matthew Weir [mailto:mattcommark@yahoo.com] 
Sent: Wednesday, May 21, 2014 7:36 PM
To: users@flex.apache.org
Subject: Re: Replacing Apostrophe (')

LOL, well that didn't work, it interpreted the HTML in the email, that was supposed to be & # 39 ;    but all together.
--------------------------------------------
On Wed, 5/21/14, Matthew Weir <ma...@yahoo.com> wrote:

 Subject: Re: Replacing Apostrophe (')
 To: users@flex.apache.org
 Date: Wednesday, May 21, 2014, 7:01 AM
 
 Try '
 
 http://www.asciitable.com/
 
 
 --------------------------------------------
 On Wed, 5/21/14, Patil, Virat <vi...@capgemini.com>
 wrote:
 
  Subject: Replacing
 Apostrophe (')
  To: "users@flex.apache.org"
 <us...@flex.apache.org>
  Date: Wednesday, May 21, 2014, 6:53 AM
  
  Hello Guys
 
 
  Is there way to replace apostrophe (')  with html element
  Example < is replaced
 with &lt;
  Similarly I want it for
 '
  
  Regards
  Virat I Patil
  
  This message contains information that may be  privileged or
  confidential and is the
 property of the Capgemini Group. It
  is
 intended only for the person to whom it is addressed. If
  you are not the intended recipient, you are  not authorized
  to read, print, retain,
 copy, disseminate, distribute, or
  use this
 message or any part thereof. If you receive this
  message in error, please notify the sender  immediately and
  delete all copies of this
 message.
 
This message contains information that may be privileged or confidential and is the property of the Capgemini Group. It is intended only for the person to whom it is addressed. If you are not the intended recipient, you are not authorized to read, print, retain, copy, disseminate, distribute, or use this message or any part thereof. If you receive this message in error, please notify the sender immediately and delete all copies of this message.


Re: Replacing Apostrophe (')

Posted by Matthew Weir <ma...@yahoo.com>.
LOL, well that didn't work, it interpreted the HTML in the email, that was supposed to be & # 39 ;    but all together.
--------------------------------------------
On Wed, 5/21/14, Matthew Weir <ma...@yahoo.com> wrote:

 Subject: Re: Replacing Apostrophe (')
 To: users@flex.apache.org
 Date: Wednesday, May 21, 2014, 7:01 AM
 
 Try '
 
 http://www.asciitable.com/
 
 
 --------------------------------------------
 On Wed, 5/21/14, Patil, Virat <vi...@capgemini.com>
 wrote:
 
  Subject: Replacing
 Apostrophe (')
  To: "users@flex.apache.org"
 <us...@flex.apache.org>
  Date: Wednesday, May 21, 2014, 6:53 AM
  
  Hello Guys
 
 
  Is there way to replace apostrophe (')
 with html element
  Example < is replaced
 with &lt;
  Similarly I want it for
 '
  
  Regards
  Virat I Patil
  
  This message contains information that may be
 privileged or
  confidential and is the
 property of the Capgemini Group. It
  is
 intended only for the person to whom it is addressed. If
  you are not the intended recipient, you are
 not authorized
  to read, print, retain,
 copy, disseminate, distribute, or
  use this
 message or any part thereof. If you receive this
  message in error, please notify the sender
 immediately and
  delete all copies of this
 message.
 

Re: Replacing Apostrophe (')

Posted by Matthew Weir <ma...@yahoo.com>.
Try &#39;

http://www.asciitable.com/


--------------------------------------------
On Wed, 5/21/14, Patil, Virat <vi...@capgemini.com> wrote:

 Subject: Replacing Apostrophe (')
 To: "users@flex.apache.org" <us...@flex.apache.org>
 Date: Wednesday, May 21, 2014, 6:53 AM
 
 Hello Guys
 
 Is there way to replace apostrophe (') with html element
 Example < is replaced with &lt;
 Similarly I want it for '
 
 Regards
 Virat I Patil
 
 This message contains information that may be privileged or
 confidential and is the property of the Capgemini Group. It
 is intended only for the person to whom it is addressed. If
 you are not the intended recipient, you are not authorized
 to read, print, retain, copy, disseminate, distribute, or
 use this message or any part thereof. If you receive this
 message in error, please notify the sender immediately and
 delete all copies of this message.