stript #anchors from urls
This commit is contained in:
parent
0a400cf53b
commit
c2c53cedd2
1 changed files with 1 additions and 1 deletions
|
@ -20,7 +20,7 @@ namespace Buypeeb {
|
||||||
|
|
||||||
public static string IDFromURL(string url) {
|
public static string IDFromURL(string url) {
|
||||||
// TODO: handle invalid URLs better, or at all really
|
// TODO: handle invalid URLs better, or at all really
|
||||||
Regex rx = new Regex(@"^([^?]+)");
|
Regex rx = new Regex(@"^([^?#]+)");
|
||||||
url = rx.Match(url).Groups[1].Value; // remove query params (if any)
|
url = rx.Match(url).Groups[1].Value; // remove query params (if any)
|
||||||
|
|
||||||
rx = new Regex(@".+\/(.+?)/?$");
|
rx = new Regex(@".+\/(.+?)/?$");
|
||||||
|
|
Loading…
Reference in a new issue