@@ -545,19 +545,19 @@ function $SceDelegateProvider() {
545
545
* characters: '`:`', '`/`', '`.`', '`?`', '`&`' and ';'. It's a useful wildcard for use
546
546
* in a whitelist.
547
547
* - `**`: 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.
549
549
* http://**.example.com/ would match http://evil.com/?ignore=.example.com/ and that might
550
550
* not have been the intention.) Its usage at the very end of the path is ok. (e.g.
551
551
* http://foo.example.com/templates/**).
552
552
* - **RegExp** (*see caveat below*)
553
553
* - *Caveat*: While regular expressions are powerful and offer great flexibility, their syntax
554
554
* (and all the inevitable escaping) makes them *harder to maintain*. It's easy to
555
555
* 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
557
557
* small number of cases. A `.` character in the regex used when matching the scheme or a
558
558
* subdomain could be matched against a `:` or literal `.` that was likely not intended. It
559
559
* 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.
561
561
* - The regular expression must be an instance of RegExp (i.e. not a string.) It is
562
562
* matched against the **entire** *normalized / absolute URL* of the resource being tested
563
563
* (even when the RegExp did not have the `^` and `$` codes.) In addition, any flags
@@ -567,7 +567,7 @@ function $SceDelegateProvider() {
567
567
* remember to escape your regular expression (and be aware that you might need more than
568
568
* one level of escaping depending on your templating engine and the way you interpolated
569
569
* 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
571
571
* [Regexp.escape(str)](http://www.ruby-doc.org/core-2.0.0/Regexp.html#method-c-escape)
572
572
* and Python has [re.escape](http://docs.python.org/library/re.html#re.escape).
573
573
* Javascript lacks a similar built in function for escaping. Take a look at Google
0 commit comments