MCPcopy Create free account
hub / github.com/MITK/MITK / EscapeHtml

Function EscapeHtml

Wrapping/Python/mitk/MultiLabelSegmentation.cpp:324–341  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

322 "<tr><th>Value</th><th>Name</th><th>Color</th><th>Visible</th><th>Locked</th></tr>";
323
324std::string EscapeHtml(const std::string& s)
325{
326 std::string out;
327 out.reserve(s.size());
328 for (const char c : s)
329 {
330 switch (c)
331 {
332 case '&': out += "&amp;"; break;
333 case '<': out += "&lt;"; break;
334 case '>': out += "&gt;"; break;
335 case '"': out += "&quot;"; break;
336 case '\'': out += "&#x27;"; break;
337 default: out += c; break;
338 }
339 }
340 return out;
341}
342
343std::string LabelColorSwatch(const Label& l)
344{

Callers 2

LabelRowHtmlFunction · 0.85
GroupHeaderRowHtmlFunction · 0.85

Calls 1

sizeMethod · 0.45

Tested by

no test coverage detected