1
0

Fixed general failings with everything. Fixes #211.

My editor fixed some extra tabs in globals.
This commit is contained in:
Alexander Harkness 2013-10-19 17:37:47 +01:00
parent 9701a7fb84
commit f7c9230106
2 changed files with 16 additions and 15 deletions

View File

@ -161,6 +161,7 @@ typedef unsigned short UInt16;
#include <memory>
#include <set>
#include <queue>
#include <sstream>

View File

@ -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;
}
}