remove anchor from source URLs
[phinde.git] / src / phinde / Helper.php
index 43345ba22899c890966c5a659bda068b0daebbe6..8e30a198609af00075f4994441ad83dc81dcfe53 100644 (file)
@@ -31,6 +31,12 @@ class Helper
         return 'http://' . $url;
     }
 
         return 'http://' . $url;
     }
 
+    public static function removeAnchor($url)
+    {
+        $parts = explode('#', $url, 2);
+        return $parts[0];
+    }
+
     public static function sanitizeTitle($str)
     {
         return trim(
     public static function sanitizeTitle($str)
     {
         return trim(