An Epicenter of Wordsmithing…for the Enterprise.
This file contains hidden or 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
/** | |
* Decodes a Proofpoint urldefense.com (v3 format) | |
* Reference: https://help.proofpoint.com/@api/deki/files/177/URLDefenseDecode.py?revision=2 | |
* @param {String} link typical format: 'https://urldefense.com/v3/__<encoded url>__;<replacement characters>!!<assorted click tracking goodness>$' | |
*/ | |
function decodeUrlDefensev3(link) { | |
var matches = link.match(new RegExp('v3/__(.+?)__;(.*?)!')) | |
// love me a mutable array | |
var decode_pile = Array.from(matches[1]); |