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

Method checkSES

engine/cssparser.js:188–212  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

186 const checkToken = (a, b) => !this.escaping && this.stringState === StringState.None && a === b;
187
188 const checkSES = c => {
189 if (this.escaping) {
190 return false;
191 }
192
193 if (c != '"' && c != '\'') {
194 return false;
195 }
196
197 const state = c == '"' ? StringState.Double : StringState.Single;
198
199 // start
200 if (this.stringState == StringState.None) {
201 this.stringState = state;
202 return true;
203 }
204
205 // end
206 if (this.stringState == state) {
207 this.stringState = StringState.None;
208 return true;
209 }
210
211 return false;
212 };
213
214 input = input.replace(/\/\*[\w\W]*?\*\//g, '');
215

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected