This repository has been archived by the owner on Apr 12, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 27.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat($sanitize): support telephone links
Per http://www.ietf.org/rfc/rfc3966.txt support tel: links
- Loading branch information
1 parent
8650843
commit 04450c4
Showing
2 changed files
with
4 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -188,7 +188,7 @@ describe('HTML', function() { | |
expect(html).toEqual('<div>'); | ||
}); | ||
|
||
describe('explicitly dissallow', function() { | ||
describe('explicitly disallow', function() { | ||
it('should not allow attributes', function() { | ||
writer.start('div', {id:'a', name:'a', style:'a'}); | ||
expect(html).toEqual('<div>'); | ||
|
@@ -230,10 +230,11 @@ describe('HTML', function() { | |
expect(isUri('https://abc')).toBeTruthy(); | ||
expect(isUri('ftp://abc')).toBeTruthy(); | ||
expect(isUri('mailto:[email protected]')).toBeTruthy(); | ||
expect(isUri('tel:123-123-1234')).toBeTruthy(); | ||
expect(isUri('#anchor')).toBeTruthy(); | ||
}); | ||
|
||
it('should not be UIR', function() { | ||
it('should not be URI', function() { | ||
expect(isUri('')).toBeFalsy(); | ||
expect(isUri('javascript:alert')).toBeFalsy(); | ||
}); | ||
|