on master help sign in
uri-encode capture values in the generated javascript code for servant-jquery
commite3af6a6af315021a0666084023a0ff89c938e15b authorAlp Mestanogullari <alpmestan@gmail.com> dateTue 25 Nov 2014, 15:58 (12 years ago) parent06d8c80
1 file changed+1−1
src/Servant/JQuery/Internal.hs+1−1
src/Servant/JQuery/Internal.hs+1−1
@@ -35,7 +35,7 @@ segmentToStr :: Segment -> Bool -> String
3535segmentToStr (Static s) notTheEnd =
3636 if notTheEnd then s else s ++ "'"
3737segmentToStr (Cap s) notTheEnd =
38− "' + " ++ s ++ if notTheEnd then " + '" else ""
38+ "' + encodeURIComponent(" ++ s ++ if notTheEnd then ") + '" else ")"
3939
4040type Path = [Segment]
4141