-
Notifications
You must be signed in to change notification settings - Fork 45
Open
Labels
Description
Operating System
Windows
Compiler
MSVC
Compiler flags
NO
maddy version
1.5.0 (latest)
Minimal Mardown example
the inlinecode and codeblock should escape the html tag
What is not working? What did you try?
i try to fix this bug
int the codeblockparser.h
line = Common::escapeHtml(line) + "\n";
and th escapeHtml function
`#ifndef COMMON_H
#define COMMON_H
namespace maddy {
class Common
{
public:
static std::string escapeHtml(const std::string& input)
{
std::string result;
for (char c : input) {
switch (c) {
case '&':
result += "&";
break;
case '<':
result += "<";
break;
case '>':
result += ">";
break;
case '"':
result += """;
break;
case '\'':
result += "'";
break;
default:
result += c;
}
}
return result;
}
};
}
#endif // COMMON_H
`