web: workaround for json encoding of </script> (#236)
This commit is contained in:
parent
d801eb1ab7
commit
f83590021a
@ -349,7 +349,8 @@ addform _ vd@VD{..} = [hamlet|
|
|||||||
dates = ["today","yesterday","tomorrow"] :: [String]
|
dates = ["today","yesterday","tomorrow"] :: [String]
|
||||||
descriptions = sort $ nub $ map tdescription $ jtxns j
|
descriptions = sort $ nub $ map tdescription $ jtxns j
|
||||||
accts = sort $ journalAccountNamesUsed j
|
accts = sort $ journalAccountNamesUsed j
|
||||||
listToJsonValueObjArrayStr as = preEscapedString $ encode $ JSArray $ map (\a -> JSObject $ toJSObject [("value", showJSON a)]) as
|
escapeJSSpecialChars = regexReplaceCI "</script>" "<\\/script>" -- #236
|
||||||
|
listToJsonValueObjArrayStr as = preEscapedString $ escapeJSSpecialChars $ encode $ JSArray $ map (\a -> JSObject $ toJSObject [("value", showJSON a)]) as
|
||||||
numpostings = 4
|
numpostings = 4
|
||||||
postingnums = [1..numpostings]
|
postingnums = [1..numpostings]
|
||||||
postingfields :: ViewData -> Int -> HtmlUrl AppRoute
|
postingfields :: ViewData -> Int -> HtmlUrl AppRoute
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user