diff --git a/src/GF/Speech/PrSRGS.hs b/src/GF/Speech/PrSRGS.hs index 4044f097f..63775c852 100644 --- a/src/GF/Speech/PrSRGS.hs +++ b/src/GF/Speech/PrSRGS.hs @@ -105,6 +105,9 @@ showsAttrs = concatS . map (showChar ' ' .) . map showsAttr showsAttr :: Attr -> ShowS showsAttr (n,v) = showString n . showString "=\"" . showString (escape v) . showString "\"" --- FIXME: escape double quotes +-- FIXME: escape strange charachters with &#xxx; escape :: String -> String -escape = id \ No newline at end of file +escape = concatMap escChar + where + escChar c | c `elem` ['"','\\'] = '\\':[c] + | otherwise = [c]