[Fencommits] fenserve: quote templates in editor textarea

Tuukka Hastrup Tuukka.Hastrup at iki.fi
Sun May 20 21:24:42 EEST 2007


Sun May 20 21:24:24 EEST 2007  Tuukka Hastrup <Tuukka.Hastrup at iki.fi>
  * quote templates in editor textarea
diff -rN -u old-fenserve/fendata/Main.hs new-fenserve/fendata/Main.hs
--- old-fenserve/fendata/Main.hs	2007-05-20 21:24:42.000000000 +0300
+++ new-fenserve/fendata/Main.hs	2007-05-20 21:24:42.000000000 +0300
@@ -293,7 +293,8 @@
 edit :: (Exp,Exp,Type) -> MyState -> (String, MyState)
 edit (exp,old@(HTML olds),ty) s = let ?state = s; ?link = False in
     ("<form action='editTemplate' method='get'>\
-     \  <p><textarea name='template' rows='20' cols='80'>" ++ f 1 olds ++
+     \  <p><textarea name='template' rows='20' cols='80'>" 
+     ++ quote (f 1 olds) ++
      "  </textarea>\
      \  <p><input type='submit' value='Submit'>\
      \  <input type='hidden' name='exp' value='"++show exp++"'>\




More information about the Fencommits mailing list