/// Returns the unencoded version of an encoded Uniform Resource Identifier (URI)

var hMainWnd=AkelPad.GetMainWnd();
var nSelStart;
var nSelEnd;
var pSelText;
var pResult;

if (hMainWnd)
{
  nSelStart=AkelPad.GetSelStart();
  nSelEnd=AkelPad.GetSelEnd();
  if (nSelStart == nSelEnd)
    AkelPad.SetSel(0, -1);

  pSelText=AkelPad.GetSelText();
  pResult=decodeURI(pSelText)
  AkelPad.ReplaceSel(pResult);

  if (nSelStart == nSelEnd)
    AkelPad.SetSel(0, -1);
  else
    AkelPad.SetSel(nSelStart, nSelStart + pResult.length);
}
