]> Sergey Matveev's repositories - public-inbox.git/blobdiff - examples/cgit-commit-filter.lua
examples/cgit-commit-filter: improve quoted text handling
[public-inbox.git] / examples / cgit-commit-filter.lua
index 8f9d3eb51d0d362814733449eacef1adf5660203..9614c94441e0149374f388e7bebc0df3662078d4 100644 (file)
@@ -32,7 +32,8 @@ function filter_close()
                        html(buffer)
                else
                        html('<a href="' .. u .. '?x=t&amp;q=')
-                       html_url_arg('"' .. buffer .. '"')
+                       s = string.gsub(buffer, '"', '""')
+                       html_url_arg('"' .. s .. '"')
                        html('"><tt>')
                        html_txt(buffer)
                        html('</tt></a>')