Module:URL: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
No edit summary |
||
| Line 32: | Line 32: | ||
-- If the URL contains any unencoded spaces, encode them, because MediaWiki will otherwise interpret a space as the end of the URL. | -- If the URL contains any unencoded spaces, encode them, because MediaWiki will otherwise interpret a space as the end of the URL. | ||
url = mw.ustring.gsub(url, '%s', function(s) return mw.uri.encode(s, 'PATH') end) | |||
-- If there is an empty query string or fragment id, remove it as it will cause mw.uri.new to throw an error | -- If there is an empty query string or fragment id, remove it as it will cause mw.uri.new to throw an error | ||