summaryrefslogtreecommitdiffstats
path: root/source/WebAdmin.cpp
diff options
context:
space:
mode:
authorAlexander Harkness <bearbin@gmail.com>2013-10-19 18:37:47 +0200
committerAlexander Harkness <bearbin@gmail.com>2013-10-19 18:37:47 +0200
commitf7c9230106503149061f31efea0e387122fc1224 (patch)
tree4254fc551dc89362a73c1220170c061bce3274a2 /source/WebAdmin.cpp
parentAdded a HTML escaping function to cWebAdmin. (diff)
downloadcuberite-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 '')
-rw-r--r--source/WebAdmin.cpp6
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 << "&amp;";
@@ -423,7 +423,7 @@ AString cWebAdmin::GetHTMLEscapedString( const AString& a_Input )
dst << "&gt;";
break;
default:
- dst << workingCharacter;
+ dst << a_Input[i];
break;
}
}