From 4113965994bb5d0c650bae13f28883d525a34002 Mon Sep 17 00:00:00 2001
From: Anne van Kesteren
Let urlRecord be the result of running the URL parser on the - URL of resource.
Let urlString be the result of running the URL serialiser on resource.
Let script source be the empty string.
Append the first string of urlRecord's path component to script source.
If urlRecord's query component is - not null, then first append a U+003F QUESTION MARK character (?) to script source, - and then append urlRecord's query - component to script source.
If urlRecord's fragment - component is not null, then first append a U+0023 NUMBER SIGN character (#) to script - source, and then append urlRecord's fragment component to script source.
Remove the leading "javascript:
" string from
+ urlString.
Replace script source with the result of applying the - percent decode algorithm to script source.
Let script source be the result of applying the percent decode + algorithm to urlString.
Replace script source with the result of applying the UTF-8 decode algorithm to script source.