diff --git a/src/noHttpStringRule.ts b/src/noHttpStringRule.ts index e936fb7a5..18c3ef6ca 100644 --- a/src/noHttpStringRule.ts +++ b/src/noHttpStringRule.ts @@ -39,7 +39,8 @@ export class Rule extends Lint.Rules.AbstractRule { class NoHttpStringWalker extends ErrorTolerantWalker { protected visitStringLiteral(node: ts.StringLiteral): void { const stringText : string = (node).text; - if (/.*http:.*/.test(stringText)) { + // tslint:disable no-http-string + if (stringText.indexOf('http:') !== -1) { if (!this.isSuppressed(stringText)) { const failureString = Rule.FAILURE_STRING + '\'' + stringText + '\''; const failure = this.createFailure(node.getStart(), node.getWidth(), failureString);