MCPcopy Index your code
hub / github.com/Macuyiko/minecraft-python / xmlEscape

Function xmlEscape

ServerEditorWeb/ace/worker-css.js:7635–7652  ·  view source on GitHub ↗
(str)

Source from the content-addressed store, hash-verified

7633
7634(function() {
7635 var xmlEscape = function(str) {
7636 if (!str || str.constructor !== String) {
7637 return "";
7638 }
7639
7640 return str.replace(/[\"&><]/g, function(match) {
7641 switch (match) {
7642 case "\"":
7643 return "&quot;";
7644 case "&":
7645 return "&amp;";
7646 case "<":
7647 return "&lt;";
7648 case ">":
7649 return "&gt;";
7650 }
7651 });
7652 };
7653
7654 CSSLint.addFormatter({
7655 id: "checkstyle-xml",

Callers 1

worker-css.jsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected