|
Liquidice
AutoLink question | suggestionJanuary 16, 2008 03:55PM |
Is there a way to limit the length of the link so that the display part gets truncated... incase someone pastes a longgggg link that goes the whole width of the page or longer?
example: http://hey.omg/what.a/long/freaking/url/k.thx.html would end up being <a href="Full url" title="Full url for mouse over tooltip">http://hey.omg/what.a...</a>
If not, this is my feature request :)
Thanks ;]
|
Re: AutoLink question | suggestion January 16, 2008 04:14PM |
Admin Registered: 6 years ago Posts: 2,640 |
Unfortunately, no.
While I could implement this, I'm slightly concerned that this won't be enough. Other strings like thisthisthisthisthisthisthisthisthisthisthisthisthisthisthisthisthisthisthisthisthisthisthisthisthisthisthisthisthisthisthisthisthisthisthisthisthisthisthisthisthisthisthisthisthisthisthisthis can be long and HTML Purifier wouldn't fix them.
|
Liquidice
Re: AutoLink question | suggestionJanuary 16, 2008 04:21PM |
Though technically possible, I can't think of any reason a person would want to do that other than screwing around so it may not hurt to just inject a space character every $limit characters in a sequence without them.
What do you think? hmm Isn't there already line wrapping functionality built in? or does that wrap on spaces already?
|
Re: AutoLink question | suggestion January 16, 2008 04:27PM |
Admin Registered: 6 years ago Posts: 2,640 |
Line wrapping functionality is not built in, and it's a slightly touchy issue. For instance, it's not a good idea to wrap the contents of pre tags, where whitespace is significant. For things like inline images, it's impossible to regulate the length. There there's an issue of CSS properties like width and margin that can also interfere with it (and we can't just clip large values: they can accumulate and then stretch). It's not just a matter of making sure text wrap—which may incur severe performance penalties.
Text wrapping turns into shearing the yak. It may work for more restrictive sets of tags/attributes, but not for full-fledged pages.
I am of the opinion that the layout should be able to accommodate extremely long lines without messing up the rest of the layout. This usually means not using tables. :-)
|
Liquidice
Re: AutoLink question | suggestionJanuary 16, 2008 04:51PM |
Ah right I see how that can complicate it right up lol...
I still consider being able to limit the display length of URLs a valid issue and believe it would be a helpful feature though, as pasting a URL into a forum is quite common and they're just plain ugly if they get too long.
I agree a site should be able to stretch – but stretching horizontally I think is rarely desirable as it can really screw up the proportions of a site in some cases. I think that's regardless of whether someone uses tables as nested elements can expand their parents.
|
Re: AutoLink question | suggestion January 16, 2008 04:53PM |
Admin Registered: 6 years ago Posts: 2,640 |
|
Liquidice
Re: AutoLink question | suggestionJanuary 16, 2008 05:11PM |