1 | var h, text, yield, __cc;
|
2 |
|
3 | __cc = {
|
4 | buffer: ""
|
5 | };
|
6 |
|
7 | text = function(txt) {
|
8 | if (typeof txt === "string" || txt instanceof String) {
|
9 | return __cc.buffer += txt;
|
10 | } else {
|
11 | if (typeof txt === "number" || txt instanceof Number) {
|
12 | return __cc.buffer += String(txt);
|
13 | }
|
14 | }
|
15 | };
|
16 |
|
17 | h = function(txt) {
|
18 | var escaped;
|
19 | escaped = void 0;
|
20 | if (typeof txt === "string" || txt instanceof String) {
|
21 | escaped = txt.replace(/&/g, "&").replace(/</g, "<").replace(/>/g, ">").replace(/"/g, """);
|
22 | } else {
|
23 | escaped = txt;
|
24 | }
|
25 | return escaped;
|
26 | };
|
27 |
|
28 | yield = function(f) {
|
29 | var old_buffer, temp_buffer;
|
30 | temp_buffer = "";
|
31 | old_buffer = __cc.buffer;
|
32 | __cc.buffer = temp_buffer;
|
33 | f();
|
34 | temp_buffer = __cc.buffer;
|
35 | __cc.buffer = old_buffer;
|
36 | return temp_buffer;
|
37 | };
|