I would like Short URL to only generate lowercase URLs, this would make them a lot more user friendly.

Comments

mgifford’s picture

this would be an interesting option to add on for sure. It does sadly limit the number of variations.

"do not use MiXeD case text in URLs since people can't remember the difference between upper-case and lower-case characters"
http://www.useit.com/alertbox/990321.html

timmillwood’s picture

I think I would rather the URL be one character longer rather than use uppercase characters.

It's very hard to tell people the URL is example.com/aBcD rather than example.com/abcd.

locomo’s picture

seems like this should be a configurable option in the module settings:

# Base 36 encoding uses 0123456789abcdefghijklmnopqrstuvwxyz
# Base 62 encoding uses 0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz

takinola’s picture

Here's how I fixed it to only generate lowercase urls. Perform the following edits in the file 'shorturl.engine.inc'

In function shorturl_base_encode_mapping, replace the line

return array(
            'q','l','i','3','O','c','x','a','C','1','r','Y',
            'g','4','2','T','b','j','D','W','Z','B','K','k',
            '0','8','9','X','I','5','N','R','n','Q','U','P',
            'E','m','y','V','p','d','v','w','f','G','7','A',
            'o','s','H','6','F','L','M','e','t','z','u','J',  
            'S','h'   
            );

with

return array(
            'q','l','i','3','c','x','a','1','r','g','4','2',
            'b','j','k','0','8','9','5','n','m','y','p','d',
            'v','w','f','7','o','s','6','e','t','z','u','h'
            );

and then you will only get urls with lowercase and numeric characters. For a real fix, someone should add an option that lets you switch as needed

Anonymous’s picture

Sugestion: characters like 0l1OI are confusing, expecially in print.

mably’s picture

Issue summary: View changes
Status: Active » Closed (outdated)

This issue was filed against the previous Drupal 6/7 module that used this project namespace.

The namespace has been taken over and the module has been replaced by a completely new and unrelated project for Drupal 10/11.

The original code remains available in the 6.x-1.x branch.

Closing this issue as it no longer applies to the current module.

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.