[Swift-commit] r6103 - trunk/resources

hategan at ci.uchicago.edu hategan at ci.uchicago.edu
Thu Dec 13 17:38:36 CST 2012


Author: hategan
Date: 2012-12-13 17:38:36 -0600 (Thu, 13 Dec 2012)
New Revision: 6103

Modified:
   trunk/resources/swiftscript.g
Log:
escape "<", ">", and "&" in string literals when compiling

Modified: trunk/resources/swiftscript.g
===================================================================
--- trunk/resources/swiftscript.g	2012-12-12 18:49:10 UTC (rev 6102)
+++ trunk/resources/swiftscript.g	2012-12-13 23:38:36 UTC (rev 6103)
@@ -1147,7 +1147,7 @@
     | s:STRING_LITERAL
       {
         code=template("sConst");
-        code.setAttribute("value",quote(s.getText()));
+        code.setAttribute("value",quote(escape(s.getText())));
       }
     | t:"true"
       {




More information about the Swift-commit mailing list