This is the community forum. For a developer response use the Client Area.
Follow us on Facebook, Twitter and YouTube!

Bugreport - v4.5 - FILTER_VALIDATE_URL
#1

Hello friends!

In the latest version, URLs with umlauts are not being processed correctly:

For example:
https://abcdefg.de/aaaaaaa is fine
https://abcdefg.de/äääääää ERROR

The issue lies within:
comments/system/library/url.php

Code:
if (filter_var($url, FILTER_VALIDATE_URL)) {

returns false for URLs with umlauts

For testing purposes:
Code:
// if (filter_var($url, FILTER_VALIDATE_URL)) {
if (true) {                                     // add

works

URLs need to be preprocessed before validation


Cu Michael
Reply
#2

Hi Michael,

Could you try the following please? This is the solution that I'll likely add in the next version so it would be good to know.

PHP Code:
<?php 
if (filter_var(idn_to_ascii($url), FILTER_VALIDATE_URL)) {

Have you completed the interview?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)