Can we decode URL with Notepad++?

Notepad++

Notepad++ Problem Overview


I am currently using this site http://ostermiller.org/calc/encode.html to decode code like.

http%3A%2F%2Fh.mysite.com%2F007%2FYRM-CD-9 to http://h.mysite.com/007/YRM-CD-9 by using URL Decode on that decoding site.

I was wondering if this can be done via Notepad++.

Notepad++ Solutions


Solution 1 - Notepad++

In Notepad++ under Plugins => MIME Tools you will find URL Encode and URL Decode.

Solution 2 - Notepad++

Thanks to PiLHA.

  1. Download the jN plugin.
  2. Place files from Zip to Plugin folder of Notepad++ in C:\Programs Files\Notepad++\plugins.
  3. Save Code below as URLENDECODE.js and save it to C:\Program Files\Notepad++\plugins\jN\includes.
  4. Restart Notepad++.

Code:

var URLDecoderEncoder = Editor.addMenu('URL-Encoding/Decoding');
URLDecoderEncoder.addItem({
    text: 'Encode',
    cmd: function() {
        var unencoded = Editor.currentView.text;
        var encoded = encodeURIComponent(unencoded);
        Editor.currentView.text = encoded;
    }
});
URLDecoderEncoder.addItem({
    text: 'Decode',
    cmd: function() {
        var encoded = Editor.currentView.text;
        var unencoded = decodeURIComponent(encoded);
        Editor.currentView.text = unencoded;
    }
});
URLDecoderEncoder.addItem({
    text: 'Decode multi-pass (7x)',
    cmd: function() {
        var encoded = Editor.currentView.text;
        var unencoded_pass1 = decodeURIComponent(encoded);
        var unencoded_pass2 = decodeURIComponent(unencoded_pass1);
        var unencoded_pass3 = decodeURIComponent(unencoded_pass2);
        var unencoded_pass4 = decodeURIComponent(unencoded_pass3);
        var unencoded_pass5 = decodeURIComponent(unencoded_pass4);
        var unencoded_pass6 = decodeURIComponent(unencoded_pass5);
        var unencoded = decodeURIComponent(unencoded_pass6);
        Editor.currentView.text = unencoded;
    }
});

Attributions

All content for this solution is sourced from the original question on Stackoverflow.

The content on this page is licensed under the Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.

Content TypeOriginal AuthorOriginal Content on Stackoverflow
QuestionMowgliView Question on Stackoverflow
Solution 1 - Notepad++Jason69View Answer on Stackoverflow
Solution 2 - Notepad++MowgliView Answer on Stackoverflow