From caf550883fcfbd10cc1a470168f984f4a40672a6 Mon Sep 17 00:00:00 2001 From: Andy Spencer Date: Sat, 9 Mar 2013 21:16:46 +0000 Subject: [PATCH] Cleanup modelines This keeps special chars from getting into into the sed commands --- index.cgi | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/index.cgi b/index.cgi index 8a90e18..0b7859e 100755 --- a/index.cgi +++ b/index.cgi @@ -15,7 +15,8 @@ # Remove url codings from stdin function get_modeline { echo "$QUERY_STRING" | - sed -e 's/%\([0-9A-F][0-9A-F]\)/\\\\\x\1/g; s/[,&?]/ /g' | + sed -e 's/%\([0-9A-F][0-9A-F]\)/\\\\\x\1/g' \ + -e 's/[^a-zA-Z0-9.:=_\-]/ /g' | xargs echo -e } function get_param { -- 2.43.2