mirror of
https://github.com/zen-browser/pdf.js.git
synced 2025-07-09 09:45:42 +02:00
Refactor LinkAnnotation
slightly to add data.url
/data.dest
at the end
This patch also makes sure that all URLs are converted to the correct encoding.
This commit is contained in:
parent
4a601ffc28
commit
b63ef7a8b6
3 changed files with 60 additions and 49 deletions
|
@ -312,7 +312,7 @@ function isSameOrigin(baseUrl, otherUrl) {
|
|||
|
||||
// Validates if URL is safe and allowed, e.g. to avoid XSS.
|
||||
function isValidUrl(url, allowRelative) {
|
||||
if (!url) {
|
||||
if (!url || typeof url !== 'string') {
|
||||
return false;
|
||||
}
|
||||
// RFC 3986 (http://tools.ietf.org/html/rfc3986#section-3.1)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue