Skip to content
This repository was archived by the owner on Apr 12, 2024. It is now read-only.

Commit d494a69

Browse files
shojaNarretz
shoja
authored andcommitted
docs($sce): correct typos
Line 548: Remove duplicate 'not' and clarify wording Line 556: Remove period within parenthetical statement Line 560: Clarify wording Line 570: Capitalize 'E.g.' at the start of a sentence Closes #12252
1 parent 91212d9 commit d494a69

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/ng/sce.js

+4-4
Original file line numberDiff line numberDiff line change
@@ -545,19 +545,19 @@ function $SceDelegateProvider() {
545545
* characters: '`:`', '`/`', '`.`', '`?`', '`&`' and ';'. It's a useful wildcard for use
546546
* in a whitelist.
547547
* - `**`: matches zero or more occurrences of *any* character. As such, it's not
548-
* not appropriate to use in for a scheme, domain, etc. as it would match too much. (e.g.
548+
* appropriate for use in a scheme, domain, etc. as it would match too much. (e.g.
549549
* http://**.example.com/ would match http://evil.com/?ignore=.example.com/ and that might
550550
* not have been the intention.) Its usage at the very end of the path is ok. (e.g.
551551
* http://foo.example.com/templates/**).
552552
* - **RegExp** (*see caveat below*)
553553
* - *Caveat*: While regular expressions are powerful and offer great flexibility, their syntax
554554
* (and all the inevitable escaping) makes them *harder to maintain*. It's easy to
555555
* accidentally introduce a bug when one updates a complex expression (imho, all regexes should
556-
* have good test coverage.). For instance, the use of `.` in the regex is correct only in a
556+
* have good test coverage). For instance, the use of `.` in the regex is correct only in a
557557
* small number of cases. A `.` character in the regex used when matching the scheme or a
558558
* subdomain could be matched against a `:` or literal `.` that was likely not intended. It
559559
* is highly recommended to use the string patterns and only fall back to regular expressions
560-
* if they as a last resort.
560+
* as a last resort.
561561
* - The regular expression must be an instance of RegExp (i.e. not a string.) It is
562562
* matched against the **entire** *normalized / absolute URL* of the resource being tested
563563
* (even when the RegExp did not have the `^` and `$` codes.) In addition, any flags
@@ -567,7 +567,7 @@ function $SceDelegateProvider() {
567567
* remember to escape your regular expression (and be aware that you might need more than
568568
* one level of escaping depending on your templating engine and the way you interpolated
569569
* the value.) Do make use of your platform's escaping mechanism as it might be good
570-
* enough before coding your own. e.g. Ruby has
570+
* enough before coding your own. E.g. Ruby has
571571
* [Regexp.escape(str)](http://www.ruby-doc.org/core-2.0.0/Regexp.html#method-c-escape)
572572
* and Python has [re.escape](http://docs.python.org/library/re.html#re.escape).
573573
* Javascript lacks a similar built in function for escaping. Take a look at Google

0 commit comments

Comments
 (0)