mirror of
https://github.com/Tygs/0bin.git
synced 2023-08-10 21:13:00 +03:00
Improved url sanitizing
This commit is contained in:
parent
14b0b37bfb
commit
7703b26333
@ -269,12 +269,12 @@ window.zerobin = {
|
||||
|
||||
getPasteId: function(url){
|
||||
var loc = url ? zerobin.parseUrl(url) : window.location;
|
||||
return loc.pathname.replace(/\/|paste/g, '').replace(/\?.*$/, '');
|
||||
return loc.pathname.replace(/\/|paste/g, '');
|
||||
},
|
||||
|
||||
getPasteKey: function(url){
|
||||
var loc = url ? zerobin.parseUrl(url) : window.location;
|
||||
return loc.hash.replace('#', '').replace(/\?.*$/, '');
|
||||
return loc.hash.replace('#', '').replace(/(\?|&).*$/, '');
|
||||
},
|
||||
|
||||
/** Return the paste content stripted from any code coloration */
|
||||
|
Loading…
Reference in New Issue
Block a user