MCPcopy Create free account
hub / github.com/totaljs/framework / escaper

Function escaper

internal.js:1780–1805  ·  view source on GitHub ↗
(value)

Source from the content-addressed store, hash-verified

1778 var isCookie = false;
1779
1780 function escaper(value) {
1781
1782 var is = REG_TAGREMOVE.test(value);
1783
1784 if (!nocompressHTML) {
1785 // value = compressHTML(value, minify, true);
1786 } else if (!isFirst) {
1787 isFirst = true;
1788 value = value.replace(/^\s+/, '');
1789 }
1790
1791 if (!value)
1792 return '$EMPTY';
1793
1794 if (!nocompressHTML && is)
1795 value += ' ';
1796
1797 txtindex = $VIEWCACHE.indexOf(value);
1798
1799 if (txtindex === -1) {
1800 txtindex = $VIEWCACHE.length;
1801 $VIEWCACHE.push(value);
1802 }
1803
1804 return '$VIEWCACHE[' + txtindex + ']';
1805 }
1806
1807 if (!command)
1808 builder += '+' + escaper(content);

Callers 1

view_parseFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected