@abaplint/runtime 2.6.23 → 2.6.25
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -7,6 +7,12 @@ function escape(input) {
|
|
|
7
7
|
let val = typeof input.val === "string" ? input.val : input.val.get();
|
|
8
8
|
const format = typeof input.format === "number" ? input.format : input.format.get();
|
|
9
9
|
switch (format) {
|
|
10
|
+
case 1: // e_xml_attr
|
|
11
|
+
val = val.replace(/&/g, "&");
|
|
12
|
+
val = val.replace(/</g, "<");
|
|
13
|
+
val = val.replace(/"/g, """);
|
|
14
|
+
val = val.replace(/'/g, "'");
|
|
15
|
+
break;
|
|
10
16
|
case 4: // e_html_text
|
|
11
17
|
val = val.replace(/&/g, "&");
|
|
12
18
|
val = val.replace(/</g, "<");
|
|
@@ -22,6 +28,10 @@ function escape(input) {
|
|
|
22
28
|
case 12: // e_url
|
|
23
29
|
val = encodeURI(val);
|
|
24
30
|
break;
|
|
31
|
+
case 24: // e_json_string
|
|
32
|
+
val = val.replace(/"/g, "\\\"");
|
|
33
|
+
val = val.replace(/\n/g, "\\n");
|
|
34
|
+
break;
|
|
25
35
|
default:
|
|
26
36
|
// todo, runtime error
|
|
27
37
|
}
|
|
@@ -48,6 +48,10 @@ function createData(target, options) {
|
|
|
48
48
|
}
|
|
49
49
|
clas.anonymous({ name: options.name, dref: target });
|
|
50
50
|
}
|
|
51
|
+
else if (options.name === "ABAP_BOOL") {
|
|
52
|
+
// ABAP_BOOL is special, its not part of the type pool, its built-into abaplint
|
|
53
|
+
target.assign(new types_1.Character(1, { qualifiedName: "ABAP_BOOL", ddicName: "ABAP_BOOL" }));
|
|
54
|
+
}
|
|
51
55
|
else {
|
|
52
56
|
(0, throw_error_1.throwError)("CX_SY_CREATE_DATA_ERROR");
|
|
53
57
|
}
|