File tree Expand file tree Collapse file tree 2 files changed +47
-0
lines changed Expand file tree Collapse file tree 2 files changed +47
-0
lines changed Original file line number Diff line number Diff line change @@ -522,6 +522,22 @@ local html = import 'html.libsonnet';
522
522
<code>std.escapeStringJson</code>.
523
523
||| ,
524
524
},
525
+ {
526
+ name: 'escapeStringXml' ,
527
+ params: ['str' ],
528
+ description: |||
529
+ Convert <code>str</code> to allow it to be embedded in XML (or HTML). The following replacements are made:
530
+ <pre>
531
+ {
532
+ "<": "&lt;",
533
+ ">": "&gt;",
534
+ "&": "&amp;",
535
+ "\"": "&quot;",
536
+ "'": "&apos;",
537
+ }
538
+ </pre>
539
+ ||| ,
540
+ },
525
541
],
526
542
},
527
543
{
Original file line number Diff line number Diff line change @@ -1093,6 +1093,37 @@ <h4 id="escapeStringPython">
1093
1093
</ div >
1094
1094
</ div >
1095
1095
1096
+ < div class ="hgroup ">
1097
+ < div class ="hgroup-inline ">
1098
+ < div class ="panel ">
1099
+ < h4 id ="escapeStringXml ">
1100
+ std.escapeStringXml(str)
1101
+ </ h4 >
1102
+ </ div >
1103
+ < div style ="clear: both "> </ div >
1104
+ </ div >
1105
+ </ div >
1106
+ < div class ="hgroup ">
1107
+ < div class ="hgroup-inline ">
1108
+ < div class ="panel ">
1109
+ < p >
1110
+ Convert < code > str</ code > to allow it to be embedded in XML (or HTML). The following replacements are made:
1111
+ < pre >
1112
+ {
1113
+ "<": "&lt;",
1114
+ ">": "&gt;",
1115
+ "&": "&amp;",
1116
+ "\"": "&quot;",
1117
+ "'": "&apos;",
1118
+ }
1119
+ </ pre >
1120
+ </ p >
1121
+
1122
+ </ div >
1123
+ < div style ="clear: both "> </ div >
1124
+ </ div >
1125
+ </ div >
1126
+
1096
1127
1097
1128
< div class ="hgroup ">
1098
1129
< div class ="hgroup-inline ">
You can’t perform that action at this time.
0 commit comments