Welcome Guest, Not a member yet? Register   Sign In
Character_limiter with HTML
#1

[eluser]AjTimme[/eluser]
Hi guys,

I hope i have a simple question...

I'm using the text helper - character_limiter but i have a little problem. The text i have is html code. So i have bold and underline tags in my text. So I would like to know how i can limit my text without having unclosed tags...

Is that possible?

Thanks!

Tim
#2

[eluser]sikkle[/eluser]
The easy shot is to where you want to cut text cut it withouth html tags with strip_tags.

Then when you show it all where it make sense.

good luck.
#3

[eluser]AjTimme[/eluser]
Mmm yes i know what you mean but it's kinda odd to show the text without bold and underline for 300 chars and if you click through you see the same text but WITH formatting. However... you may be right... it's not that important anyway. Thanks!
#4

[eluser]sikkle[/eluser]
I tend to want control over title or stripped text to make them css friendly all the time. So i mean you can make them be whatever fitting with the spot they are and control them.

Good luck !
#5

[eluser]Kotzilla[/eluser]
Word limiter with tag it's hard to cut.

for example. imagine if word like this "<font color="red"><i> 1 ..<u> 60 ... 70 </u> .. 100 </i></font>"
but you have to limiter with 65 character

after this paragraph will be in tag too
stip_tag should be great solution =)




Theme © iAndrew 2016 - Forum software by © MyBB