Forums

[Plugin: Business Directory] Version 0.8.3 Beta and Website URL Validation (Possible Fix) (2 posts)

  1. btaz
    Member
    Posted 1 month ago #

    The current implementation only allows very basic website URLs.
    Unfortunately not everyone has a top-level domain

    For example these URLs are not allowed in the latest version (0.8.3 Beta):

    http://www.somesite.com/
    http://www.somesite.com/some-url-path/
    http://www.somesite.com/some_url_path/index.html

    A quick fix for this is to find this string in "functions.php"

    /^http{1}s?:{1}\/\/{1}[A-z0-9]+[A-z0-9\-\.]*\.{1}[A-z]{2,4}$/

    and replace it with

    /^http{1}s?:{1}\/\/{1}[A-z0-9]+[A-z0-9\-\.]*\.{1}[A-z]{2,4}(\/([a-zA-Z0-9\.\-_])+)*(\/){0,1}$/

    This will support the URLs above

    http://wordpress.org/extend/plugins/business-directory/

  2. jpatterson
    Member
    Posted 1 month ago #

    Thanks for that, we'll working on getting that in on the next revision.

Reply

You must log in to post.

About this Topic