':' is not replaced in URLs #1

Closed
opened 2023-04-25 22:16:50 +00:00 by p4bl0- · 0 comments
p4bl0- commented 2023-04-25 22:16:50 +00:00 (Migrated from github.com)

Hello,

The : character is not replaced in URL while this should be the case.

    public static function cleanStr(?string $str): ?string
    {
        return is_null($str) ? null : strtr(self::removeAccents($str), ',!.?;', '-----');
    }

should be

    public static function cleanStr(?string $str): ?string
    {
        return is_null($str) ? null : strtr(self::removeAccents($str), ',!.?;:', '------');
    }

Some other characters than : that might be found in post titles should and are not currently replaced by this plugin includes : @, $, «, », °, and *.

So maybe:

    public static function cleanStr(?string $str): ?string
    {
        return is_null($str) ? null : strtr(self::removeAccents($str), ',!.?;:@$«»°*', '------------');
    }
Hello, The `:` character is not replaced in URL while this should be the case. ```php public static function cleanStr(?string $str): ?string { return is_null($str) ? null : strtr(self::removeAccents($str), ',!.?;', '-----'); } ``` should be ```php public static function cleanStr(?string $str): ?string { return is_null($str) ? null : strtr(self::removeAccents($str), ',!.?;:', '------'); } ``` Some other characters than `:` that might be found in post titles should and are not currently replaced by this plugin includes : `@`, `$`, `«`, `»`, `°`, and `*`. So maybe: ```php public static function cleanStr(?string $str): ?string { return is_null($str) ? null : strtr(self::removeAccents($str), ',!.?;:@$«»°*', '------------'); } ```
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: JcDenis/cleanURLs#1
No description provided.