Path: csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!weretis.net!feeder4.news.weretis.net!eternal-september.org!feeder.eternal-september.org!mx04.eternal-september.org!.POSTED!not-for-mail From: Gene Wirchenko Newsgroups: comp.lang.javascript Subject: JavaScript's Character Escaping Functions Date: Thu, 29 Dec 2011 17:30:08 -0800 Organization: A noiseless patient Spider Lines: 23 Message-ID: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Injection-Info: mx04.eternal-september.org; posting-host="JCn9+dUdCQH+ycRezr2Sxw"; logging-data="28433"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+0rx72MrgEkWhb1vhDkx6Zckpvpon85tk=" X-Newsreader: Forte Agent 4.2/32.1118 Cancel-Lock: sha1:4drN0v5dZVY+OQInB6HYRxWQENc= Xref: x330-a1.tempe.blueboxinc.net comp.lang.javascript:9776 Dear JavaScripters: There are a number of functions for escaping various characters and de-escaping them: Escape Function Unescape Function --------------- ----------------- escape() unescape() encodeURI() decodeURI() encodeURIComponent() decodeURIComponent() There may be others that I am unaware of. What I am definitely unaware of is when to use them. I have not seen any material on that other than vague (to me) sentences. They seem to assume that people already know what they are doing with them. Between them and HTML's "&something;", I really could use a good grounding in the area. Pointers please? Sincerely, Gene Wirchenko