[Rt-commit] rt branch, 4.0/makeclicky-remove-spaces, created. rt-4.0.2-199-g6ae1499
Thomas Sibley
trs at bestpractical.com
Thu Nov 3 14:02:11 EDT 2011
The branch, 4.0/makeclicky-remove-spaces has been created
at 6ae1499908a7db1bb1d49b7526ce99c06c6a5215 (commit)
- Log -----------------------------------------------------------------
commit 6ae1499908a7db1bb1d49b7526ce99c06c6a5215
Author: Thomas Sibley <trs at bestpractical.com>
Date: Thu Nov 3 13:52:37 2011 -0400
There's no need to insert spaces into urls anymore
Since bd7b180 (3.9.4) we use word-wrap: break-word on the message body,
which lets the browser break lines in the middle of words if it needs
to. This CSS property is a lot cleaner than shotgunning in spaces or
or <wbr> every so often, and has great browser support:
https://developer.mozilla.org/en/CSS/word-wrap#Browser_compatibility
If the more general application of word-wrap: break-word ever goes away
on message bodies, we should apply it to links within the message body.
diff --git a/etc/RT_Config.pm.in b/etc/RT_Config.pm.in
index 2604f21..19e3d6a 100755
--- a/etc/RT_Config.pm.in
+++ b/etc/RT_Config.pm.in
@@ -1613,9 +1613,7 @@ provides two formats:
link after the URL.
* 'httpurl_overwrite': also detects URLs as 'httpurl' format, but
- replaces the URL with a link and *adds spaces* into the text if it
- is longer then 30 characters. This allows the browser to wrap long
- URLs and avoid horizontal scrolling.
+ replaces the URL with a link.
See F<share/html/Elements/MakeClicky> for documentation on how to add
your own styles of link detection.
diff --git a/share/html/Elements/MakeClicky b/share/html/Elements/MakeClicky
index c4bbc6c..7ca5c6b 100644
--- a/share/html/Elements/MakeClicky
+++ b/share/html/Elements/MakeClicky
@@ -61,8 +61,6 @@ my %actions = (
url_overwrite => sub {
my %args = @_;
my $result = qq{<a target="new" href="$args{'value'}">};
- #XXX: use spaces here. <wbr> are not well supported :(
- $args{'value'} =~ s/(\S{30})/$1 /g;
$result .= qq{$args{'value'}</a>};
return qq{<span class="clickylink">$result</span>};
},
@@ -178,9 +176,7 @@ provides two formats:
link after the URL.
* 'httpurl_overwrite': also detects URLs as 'httpurl' format, but
- replace URL with link and *adds spaces* into text if it's longer
- then 30 chars. This allow browser to wrap long URLs and avoid
- horizontal scrolling.
+ replace URL with link.
To extend this with your own types of data, use the callback.
It will be provided with:
-----------------------------------------------------------------------
More information about the Rt-commit
mailing list