#include "TextAttribute.h" #include #include "StringUtils.h" TextAttribute::TextAttribute(string name, string value): XMLAttribute(std::move(name)), value(std::move(value)) {} TextAttribute::~TextAttribute() = default; void TextAttribute::writeOut(OutputStream* out) { string v = this->value; StringUtils::replaceAllChars(v, { replace_pair('&', "&"), replace_pair('\"', """), replace_pair('<', "<"), replace_pair('>', ">"), replace_pair('\n', " "), }); out->write(v); }