mirror of https://github.com/bsnes-emu/bsnes.git
19 lines
464 B
C++
19 lines
464 B
C++
#pragma once
|
|
|
|
namespace nall::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;
|
|
}
|
|
|
|
}
|