joedolson / my-calendar

My Calendar WordPress Plugin
https://www.joedolson.com/my-calendar/
GNU General Public License v3.0
19 stars 16 forks source link

_mc_is_url() returns false on correct link #569

Closed czokalapik closed 10 months ago

czokalapik commented 1 year ago

My calendar returns <span> instead links to events. I tracked this to _mc_is_url() returning false on correct link with query uri. https://github.com/joedolson/my-calendar/blob/afc71105410ef723b0885286f4fa9c50c67c2543/src/includes/general-utilities.php#L290-L293

I temporarily solved it by changing the function to return filter_var($url, FILTER_VALIDATE_URL);.

joedolson commented 1 year ago

I don't use filter_validate_url because it allows a huge variety of non-URL structures, so it's not really doing the job I want this function to do. However, I've been trying to reproduce the problem you reported, and I just can't get it to happen for me. I think I may need the actual URL you're using - the masked example in your support request tests as valid for me. You could DM it to me in the WordPress Slack, if you're on there.

joedolson commented 10 months ago

With no reproduction information, I'm closing this issue. Feel free to comment if you can provide a reproduction URL.