|
|
|
|
|
by tlb
2746 days ago
|
|
It's worth getting the escaping right in a library like this. For example, at https://github.com/tinfoilboy/CTML/blob/master/include/ctml.... for (const auto& attr : m_attributes)
output << " " << attr.first + "=\"" << attr.second + "\"";
it'll generate incorrect HTML if an attribute value has a " character. Although early versions of HTML were kind of vague on how escaping was supposed to work, the HTML5 standard explains it in detail. |
|