mirror of https://github.com/bsnes-emu/bsnes.git
19 lines
476 B
C++
19 lines
476 B
C++
|
#pragma once
|
||
|
|
||
|
namespace nall { namespace Encode {
|
||
|
|
||
|
inline auto HTML(const string& input) -> string {
|
||
|
string output;
|
||
|
for(char c : input) {
|
||
|
if(c == '&' ) { output.append("&" ); continue; }
|
||
|
if(c == '<' ) { output.append("<" ); continue; }
|
||
|
if(c == '>' ) { output.append(">" ); continue; }
|
||
|
if(c == '"' ) { output.append("""); continue; }
|
||
|
if(c == '\'') { output.append("'"); continue; }
|
||
|
output.append(c);
|
||
|
}
|
||
|
return output;
|
||
|
}
|
||
|
|
||
|
}}
|