MCPcopy Create free account
hub / github.com/CanadaHonk/shadow / checkSES

Method checkSES

engine/htmlparser.js:63–87  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

61 const checkToken = (a, b) => !this.escaping && a === b;
62
63 const checkSES = c => {
64 if (this.escaping) {
65 return false;
66 }
67
68 if (c != '"' && c != '\'') {
69 return false;
70 }
71
72 const state = c == '"' ? StringState.Double : StringState.Single;
73
74 // start
75 if (this.stringState == StringState.None) {
76 this.stringState = state;
77 return true;
78 }
79
80 // end
81 if (this.stringState == state) {
82 this.stringState = StringState.None;
83 return true;
84 }
85
86 return false;
87 };
88
89 const isspace = c => c === ' ' || c === '\n';
90 const isclosing = c => c === '>' || c === '/';

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected