File tree Expand file tree Collapse file tree 1 file changed +6
-0
lines changed
bases/rsptx/interactives/runestone/activecode/js Expand file tree Collapse file tree 1 file changed +6
-0
lines changed Original file line number Diff line number Diff line change @@ -958,6 +958,9 @@ export default class LiveCode extends ActiveCode {
958958 return classes ;
959959 }
960960}
961+
962+ // Warning - returns undefined if safe is an empty string
963+ // existing usages in constructor appear to rely on that behavior
961964function unescapeHtml ( safe ) {
962965 if ( safe ) {
963966 return safe
@@ -968,6 +971,8 @@ function unescapeHtml(safe) {
968971 . replace ( / & # x 2 7 ; / g, "'" ) ;
969972 }
970973}
974+
975+ // Designed to produce HTML from a string, so always return a string
971976function escapeHtml ( str ) {
972977 if ( str ) {
973978 return str
@@ -977,4 +982,5 @@ function escapeHtml(str) {
977982 . replace ( / ' / g, ''' )
978983 . replace ( / " / g, '"' ) ;
979984 }
985+ return '' ;
980986}
You can’t perform that action at this time.
0 commit comments