Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(77)

Side by Side Diff: samples/third_party/xmljs/tinyxmlsax.js

Issue 3083012: Tidying up. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/o3d/
Patch Set: '' Created 10 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « samples/third_party/xmljs/COPYING ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // ========================================================================= 1 // =========================================================================
2 // 2 //
3 // tinyxmlsax.js - an XML SAX parser in JavaScript compressed for downloading 3 // tinyxmlsax.js - an XML SAX parser in JavaScript compressed for downloading
4 // 4 //
5 // version 3.1 5 // version 3.1
6 // 6 //
7 // ========================================================================= 7 // =========================================================================
8 // 8 //
9 // Copyright (C) 2000 - 2002, 2003 Michael Houghton (mike@idle.org), Raymond Irv ing and David Joham (djoham@yahoo.com) 9 // Copyright (C) 2000 - 2002, 2003 Michael Houghton (mike@idle.org), Raymond Irv ing and David Joham (djoham@yahoo.com)
10 // 10 //
(...skipping 202 matching lines...) Expand 10 before | Expand all | Expand 10 after
213 str = str.replace(escAmpRegEx, "&"); 213 str = str.replace(escAmpRegEx, "&");
214 str = str.replace(escLtRegEx, "<"); 214 str = str.replace(escLtRegEx, "<");
215 str = str.replace(escGtRegEx, ">"); 215 str = str.replace(escGtRegEx, ">");
216 str = str.replace(quotRegEx, """); 216 str = str.replace(quotRegEx, """);
217 str = str.replace(aposRegEx, "'"); 217 str = str.replace(aposRegEx, "'");
218 218
219 return str; 219 return str;
220 } 220 }
221 221
222 /** 222 /**
223 * function __unescapeString 223 * function __unescapeString
224 * 224 *
225 * author: David Joham djoham@yahoo.com 225 * author: David Joham djoham@yahoo.com
226 * 226 *
227 * @param str : string - The string to be unescaped 227 * @param str : string - The string to be unescaped
228 * 228 *
229 * @return : string - The unescaped string 229 * @return : string - The unescaped string
230 */ 230 */
231 function __unescapeString(str) { 231 function __unescapeString(str) {
232 232
233 var escAmpRegEx = /&/g; 233 var escAmpRegEx = /&/g;
234 var escLtRegEx = /</g; 234 var escLtRegEx = /</g;
235 var escGtRegEx = />/g; 235 var escGtRegEx = />/g;
236 var quotRegEx = /"/g; 236 var quotRegEx = /"/g;
237 var aposRegEx = /'/g; 237 var aposRegEx = /'/g;
238 238
239 str = str.replace(escAmpRegEx, "&"); 239 str = str.replace(escAmpRegEx, "&");
240 str = str.replace(escLtRegEx, "<"); 240 str = str.replace(escLtRegEx, "<");
241 str = str.replace(escGtRegEx, ">"); 241 str = str.replace(escGtRegEx, ">");
242 str = str.replace(quotRegEx, "\""); 242 str = str.replace(quotRegEx, "\"");
243 str = str.replace(aposRegEx, "'"); 243 str = str.replace(aposRegEx, "'");
244 return str; 244 return str;
245 } 245 }
OLDNEW
« no previous file with comments | « samples/third_party/xmljs/COPYING ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698