[icinga-checkins] icinga.org: icinga-core/mfriedrich/core: classic ui: fix object values in utf8 are displayed incorrectly in the web interface ( Alexey Dvoryanchikov) #952

git at icinga.org git at icinga.org
Wed Nov 3 14:25:12 CET 2010


Module: icinga-core
Branch: mfriedrich/core
Commit: 62d89c18e2a5a3ae8016cb3a3e39ec3c424b7225
URL:    https://git.icinga.org/?p=icinga-core.git;a=commit;h=62d89c18e2a5a3ae8016cb3a3e39ec3c424b7225

Author: Michael Friedrich <michael.friedrich at univie.ac.at>
Date:   Wed Nov  3 14:24:06 2010 +0100

classic ui: fix object values in utf8 are displayed incorrectly in the web interface (Alexey Dvoryanchikov) #952

also removed header meta information, charset/content language
should be decided by apache - and might default to utf8 then.

fixes #952

---

 Changelog          |    5 +++--
 cgi/cgiutils.c     |   10 ++++++++++
 html/index.html.in |    2 --
 3 files changed, 13 insertions(+), 4 deletions(-)

diff --git a/Changelog b/Changelog
index 4682354..8ac62ee 100644
--- a/Changelog
+++ b/Changelog
@@ -14,8 +14,9 @@ FIXES
 
 * classic ui: change servicestatus letter color to default black, not grey #946
 * classic ui: fix waste of cpu in status summary (TomTom) #933
-* classic ui: fix config.cgi start page wrong "command cxpansion" url(Alexey Dvoryanchikov) #951
-* classic ui: do not allow url_encode returning empty string on Solaris (Ethan Galstad, Ton Voon) #924 
+* classic ui: fix config.cgi start page wrong "command cxpansion" url (Alexey Dvoryanchikov) #951
+* classic ui: do not allow url_encode returning empty string on Solaris (Ethan Galstad, Ton Voon) #924
+* classic ui: fix object values in utf8 are displayed incorrectly in the web interface (Alexey Dvoryanchikov) #952
 
 * install: fix LD_LIBRARY_PATH export on non bash in idoutils init script (Alexander Skwar) #936
 * install: add log2ido for adding archived logs onto socket/rdbms #926
diff --git a/cgi/cgiutils.c b/cgi/cgiutils.c
index a741853..a499cbc 100644
--- a/cgi/cgiutils.c
+++ b/cgi/cgiutils.c
@@ -1412,6 +1412,12 @@ char * url_encode(char *input){
 			y++;
 		        }
 
+		/* high bit characters don't get encoded */
+		else if((unsigned char)input[x]>=0x7f){
+			str[y]=input[x];
+			y++;
+		}
+
 		/* spaces are pluses */
 		else if((char)input[x]<=(char)' '){
 			str[y]='+';
@@ -1576,6 +1582,10 @@ char * escape_string(char *input){
 		else if(((char)input[x]==(char)' ') || ((char)input[x]==(char)'-') || ((char)input[x]==(char)'.') || ((char)input[x]==(char)'_') || ((char)input[x]==(char)':'))
 			encoded_html_string[y++]=input[x];
 
+		/* high bit characters don't get encoded */
+		else if((unsigned char)input[x]>=0x7f)
+			encoded_html_string[y++]=input[x];
+
 		/* for simplicity, all other chars represented by their numeric value */
 		else{
 			encoded_html_string[y]='\x0';
diff --git a/html/index.html.in b/html/index.html.in
index 4fd1e86..b31da51 100644
--- a/html/index.html.in
+++ b/html/index.html.in
@@ -2,8 +2,6 @@
 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="fr" lang="fr">
 <head>
 	<title>Icinga</title>
-	<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
-	<meta http-equiv="Content-Language" content="fr" />
 	<meta name="robots" content="noindex, nofollow" />
 	<link rel="shortcut icon" type="image/x-icon" href="images/favicon.ico" />
 </head>





More information about the icinga-checkins mailing list