dynamic / silverstripe-locator

SilverStripe Locator Module. Show locations on a map. Search by geoposition.
http://www.dynamicagency.com/labs/silverstripe-locator-module/
BSD 3-Clause "New" or "Revised" License
21 stars 7 forks source link

FEATURE Location - check website URLS for http/https #217

Closed jsirish closed 4 years ago

jsirish commented 4 years ago

Is your feature request related to a problem? Please describe. Currently, a website URL can be added to a Location, but the user must enter http:// or https:// for it to display/work correctly on the front end.

Describe the solution you'd like A method to check website URLs and add missing http:// or https:// prefixes

From another project:

    /**
     * @param $url
     */
    public function updateWebsiteURL(&$url)
    {
        if ($url && !preg_match('/^(http|https):\/\//', $url)) {
            $url = 'http://' . $url;
        }
    }
jsirish commented 4 years ago

closed via #215 closed via #216