Allow Customizable URL Trim Length

timtrinidad - December 20, 2008 - 18:23
Project:HTML Mail
Version:6.x-1.x-dev
Component:Code
Category:feature request
Priority:normal
Assigned:Unassigned
Status:closed
Description

The module defaults to 72 for URL lengths - any longer and it trims it and adds a "...". This breaks for a couple of mail clients (my school uses SquirrelMail a lot, and it doesn't read HTML mail properly so copy-pasting a link longer than 72 characters doesn't work). I suggest that the length be customizable through the admin/settings/htmlmail page as follows (using "0" to disable trimming):

  • Add the field to the settings page
  • In the _htmlmail_url_trim function, replace "72" with the appropriate variable_get
  • In _htmlmail_url_trim, add $length != 0 && to the second if statement.

I've included a patch to the latest CVS snapshot for review; I'm not entirely sure about my wording for the URL Length field description.

AttachmentSize
urltrim.patch1.24 KB

#1

timtrinidad - January 6, 2009 - 13:46

Thoughts?

#2

Chris Herberte - January 8, 2009 - 05:17
Status:needs work» fixed

patch applied to 6.x-1.x-dev

#3

System Message - January 22, 2009 - 05:20
Status:fixed» closed

Automatically closed -- issue fixed for two weeks with no activity.

 
 

Drupal is a registered trademark of Dries Buytaert.