WordPress.org

Ready to get started?Download WordPress

Forums

[Plugin: Cyr-To-Lat] Bug with slugs containing trailing non-alphanumerics (1 post)

  1. karevn
    Member
    Posted 3 years ago #

    When post's slug contains some non-alphanumeric characters at the beginning or the end - they're converted to multiple dashes. Example -> 20'' are converted into 20--.

    Here is the fix:

    add the next code to line 38:

    $title = preg_replace('/\-+/', '-', $title);
    $title = preg_replace('/^-+/', '', $title);
    $title = preg_replace('/-+$/', '', $title);

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.