x4js 2.2.38 → 2.2.40
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.
package/package.json
CHANGED
|
@@ -83,7 +83,7 @@ class CTreeViewItem extends Box {
|
|
|
83
83
|
|
|
84
84
|
if( item ) {
|
|
85
85
|
this._label = new HBox( {cls:"label item", content: [
|
|
86
|
-
this._icon = new Icon( { iconId: item.children ? folder_icon : undefined } ),
|
|
86
|
+
this._icon = new Icon( { cls: "opener", iconId: item.children ? folder_icon : undefined } ),
|
|
87
87
|
new Label( { tag: "span", cls: "", text: item.text, icon: item.iconId } ),
|
|
88
88
|
]});
|
|
89
89
|
|
package/src/core/core_tools.ts
CHANGED
|
@@ -115,7 +115,7 @@ export function unsafeHtml(x: string): UnsafeHtml {
|
|
|
115
115
|
|
|
116
116
|
export function unsafe(strings: TemplateStringsArray, ...values: any[]): UnsafeHtml {
|
|
117
117
|
const result = strings.reduce((acc, str, i) => {
|
|
118
|
-
return acc + str + (values[i] ?? '');
|
|
118
|
+
return acc + str + sanitizeHtml(values[i] ?? '');
|
|
119
119
|
}, '');
|
|
120
120
|
return unsafeHtml(result);
|
|
121
121
|
}
|
|
@@ -1032,6 +1032,10 @@ const _rx_escape = /[&<>"']/g;
|
|
|
1032
1032
|
*/
|
|
1033
1033
|
|
|
1034
1034
|
export function sanitizeHtml( input: string ): string {
|
|
1035
|
+
if( input===undefined || input===null || input==="" ) {
|
|
1036
|
+
return "";
|
|
1037
|
+
}
|
|
1038
|
+
|
|
1035
1039
|
if( !_rx_escape.test( input ) ) {
|
|
1036
1040
|
return input;
|
|
1037
1041
|
}
|
package/src/x4_for_doc.ts
DELETED
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* ___ ___ __
|
|
3
|
-
* \ \/ / / _
|
|
4
|
-
* \ / /_| |_
|
|
5
|
-
* / \____ _|
|
|
6
|
-
* /__/\__\ |_|
|
|
7
|
-
*
|
|
8
|
-
* @file x4.ts
|
|
9
|
-
* @author Etienne Cochard
|
|
10
|
-
*
|
|
11
|
-
* @copyright (c) 2026 R-libre ingenierie
|
|
12
|
-
*
|
|
13
|
-
* Use of this source code is governed by an MIT-style license
|
|
14
|
-
* that can be found in the LICENSE file or at https://opensource.org/licenses/MIT.
|
|
15
|
-
**/
|
|
16
|
-
|
|
17
|
-
export * from "./x4"
|
|
18
|
-
|
|
19
|
-
// just for embedded documentation, do not use in production
|
|
20
|
-
// here a huge modules not needed everywhere
|
|
21
|
-
export * from "./components/monaco/monaco"
|