Vitaly Puzrin
10 years ago
9 changed files with 42 additions and 27 deletions
@ -0,0 +1,7 @@ |
|||||
|
// Just a shortcut for bulk export
|
||||
|
'use strict'; |
||||
|
|
||||
|
|
||||
|
exports.parseLinkLabel = require('./parse_link_label'); |
||||
|
exports.parseLinkDestination = require('./parse_link_destination'); |
||||
|
exports.parseLinkTitle = require('./parse_link_title'); |
@ -1,17 +0,0 @@ |
|||||
'use strict'; |
|
||||
|
|
||||
|
|
||||
var replaceEntities = require('../common/utils').replaceEntities; |
|
||||
|
|
||||
|
|
||||
module.exports = function normalizeLink(url) { |
|
||||
var normalized = replaceEntities(url); |
|
||||
|
|
||||
// We don't care much about result of mailformed URIs,
|
|
||||
// but shoud not throw exception.
|
|
||||
try { |
|
||||
normalized = decodeURI(normalized); |
|
||||
} catch (__) {} |
|
||||
|
|
||||
return encodeURI(normalized); |
|
||||
}; |
|
Loading…
Reference in new issue