diff options
author | Alexander Harkness <bearbin@gmail.com> | 2013-10-19 18:37:47 +0200 |
---|---|---|
committer | Alexander Harkness <bearbin@gmail.com> | 2013-10-19 18:37:47 +0200 |
commit | f7c9230106503149061f31efea0e387122fc1224 (patch) | |
tree | 4254fc551dc89362a73c1220170c061bce3274a2 /source/WebAdmin.cpp | |
parent | Added a HTML escaping function to cWebAdmin. (diff) | |
download | cuberite-f7c9230106503149061f31efea0e387122fc1224.tar cuberite-f7c9230106503149061f31efea0e387122fc1224.tar.gz cuberite-f7c9230106503149061f31efea0e387122fc1224.tar.bz2 cuberite-f7c9230106503149061f31efea0e387122fc1224.tar.lz cuberite-f7c9230106503149061f31efea0e387122fc1224.tar.xz cuberite-f7c9230106503149061f31efea0e387122fc1224.tar.zst cuberite-f7c9230106503149061f31efea0e387122fc1224.zip |
Diffstat (limited to 'source/WebAdmin.cpp')
-rw-r--r-- | source/WebAdmin.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/source/WebAdmin.cpp b/source/WebAdmin.cpp index 1d2fe93b5..f72f9f63b 100644 --- a/source/WebAdmin.cpp +++ b/source/WebAdmin.cpp @@ -404,8 +404,8 @@ AString cWebAdmin::GetHTMLEscapedString( const AString& a_Input ) std::stringstream dst; // Loop over input and substitute HTML characters for their alternatives. - for (char workingCharacter : a_Input) { - switch (workingCharacter) + for (int i = 0; i < a_Input.length(); i++) { + switch ( a_Input[i] ) { case '&': dst << "&"; @@ -423,7 +423,7 @@ AString cWebAdmin::GetHTMLEscapedString( const AString& a_Input ) dst << ">"; break; default: - dst << workingCharacter; + dst << a_Input[i]; break; } } |