tazpanel rev 176
libtpaznel: syntax_highlighter should dehtmlize first
author | Pascal Bellard <pascal.bellard@slitaz.org> |
---|---|
date | Tue May 31 11:38:21 2011 +0200 (2011-05-31) |
parents | 928c4919e092 |
children | cf97da078744 |
files | lib/libtazpanel |
line diff
1.1 --- a/lib/libtazpanel Fri May 27 16:48:02 2011 +0200 1.2 +++ b/lib/libtazpanel Tue May 31 11:38:21 2011 +0200 1.3 @@ -26,12 +26,14 @@ 1.4 syntax_highlighter() { 1.5 case $1 in 1.6 conf) 1.7 - sed -e s"#^\#\([^']*\)#<span class='conf-comment'>\0</span>#"g \ 1.8 + sed -e 's|&|\&|g' -e 's|<|\<|g' -e 's|>|\>|g' \ 1.9 + s"#^\#\([^']*\)#<span class='conf-comment'>\0</span>#"g \ 1.10 -e s"#^[A-Z]\([^']*\)=#<span class='conf-var'>\0</span>#"g \ 1.11 -e s"#^[a-z]\([^']*\)#<span class='conf-var'>\0</span>#"g \ 1.12 -e s"#\"\([^']*\)\"#<span class='conf-val'>\0</span>#"g ;; 1.13 sh) 1.14 - sed -e s"#^\#\([^']*\)#<span class='sh-comment'>\0</span>#"g \ 1.15 + sed -e 's|&|\&|g' -e 's|<|\<|g' -e 's|>|\>|g' \ 1.16 + -e s"#^\#\([^']*\)#<span class='sh-comment'>\0</span>#"g \ 1.17 -e s"#\"\([^']*\)\"#<span class='sh-val'>\0</span>#"g ;; 1.18 diff) 1.19 sed -e 's|&|\&|g' -e 's|<|\<|g' -e 's|>|\>|g' \