tazbug rev 39

bug 43 again...
author Pascal Bellard <pascal.bellard@slitaz.org>
date Thu Dec 20 10:19:35 2012 +0100 (2012-12-20)
parents 3315410e3e85
children 194cf31e095c
files web/bugs.cgi
line diff
     1.1 --- a/web/bugs.cgi	Thu Dec 20 10:06:20 2012 +0100
     1.2 +++ b/web/bugs.cgi	Thu Dec 20 10:19:35 2012 +0100
     1.3 @@ -69,7 +69,10 @@
     1.4  EOT
     1.5  }
     1.6  
     1.7 -
     1.8 +GETfiltered()
     1.9 +{
    1.10 +GET $1 | sed -e "s/'/\&#39;/g; s|\n|<br/>|g; s/\t/\&#09;/g;s/\%22/\"/g"
    1.11 +}
    1.12  
    1.13  js_redirection_to()
    1.14  {
    1.15 @@ -335,9 +338,9 @@
    1.16  	fi
    1.17  	js_log "Will write message in $bugdir/$id/msg.$count "
    1.18  	sed "s/$(echo -en '\r') /\n/g" > $bugdir/$id/msg.$count << EOT
    1.19 -USER='$(echo $(GET $USER) | sed -e "s/'/\&#39;/g; s/\\\n/<br\/>/g; s/\\\t/\&#09;/g; s/\%22/\"/g"  )'
    1.20 +USER="$USER"
    1.21  DATE="$date"
    1.22 -MSG='$(echo $(GET msg) | sed -e "s/'/\&#39;/g; s/\\\n/<br\/>/g; s/\\\t/\&#09;/g; s/\%22/\"/g"  )'
    1.23 +MSG="$(GETfiltered msg)"
    1.24  EOT
    1.25  }
    1.26  
    1.27 @@ -356,14 +359,14 @@
    1.28  	sed "s/$(echo -en '\r') /\n/g" > $bugdir/$count/bug.conf << EOT
    1.29  # SliTaz Bug configuration
    1.30  
    1.31 -BUG='$(echo $(GET bug) | sed -e "s/'/\&#39;/g; s/\\\n/<br\/>/g; s/\\\t/\&#09;/g; s/\%22/\"/g"  )'
    1.32 +BUG="$(GETfiltered bug)"
    1.33  STATUS="OPEN"
    1.34  PRIORITY="$(GET priority)"
    1.35  CREATOR="$USER"
    1.36  DATE="$date"
    1.37 -PKGS='$(echo $(GET pkgs) | sed -e "s/'/\&#39;/g; s/\\\n/<br\/>/g; s/\\\t/\&#09;/g; s/\%22/\"/g"  )''
    1.38 +PKGS="$(GETfiltered pkgs)"
    1.39  
    1.40 -DESC='$(echo $(GET desc) | sed -e "s/'/\&#39;/g; s/\\\n/<br\/>/g; s/\\\t/\&#09;/g; s/\%22/\"/g"  )''
    1.41 +DESC="$(GETfiltered desc)"
    1.42  EOT
    1.43  }
    1.44