I'm looking for a way to truncate links displayed in my text.
Ie: <p><I want to share a link : http://www.itabc.org/wp-content/uploads/2013/10/Tools-for-Ruby-on-Rails-logo.jpg it rocks!</p>
Into : <p>I want to share a link : http://www.itabc.org/wp-con... it rocks!</p>
I want obviously to keep my href working.
Do you have any advice for me? I guess I need to create an helper.
EDIT:
The text ins't static in my views, I want to manage content posted by users in messages, so I have to find a way to truncate links automaticaly
thx