Jump to content
GreenSock

Search In
  • More options...
Find results that contain...
Find results in...
pakl

Bug: <br> turns into {{LT}}br> when using splittext

Recommended Posts

I don't actually need this functionality but since it's clearly a bug I thought it's worth reporting.

 

Having a '<br>' string when using splittext chars animations, will turn it into '{{LT}}br>'.

 

See the Pen wFkbL by patrickklug (@patrickklug) on CodePen

Link to comment
Share on other sites

Hello pakl,

 

This doesn't look like it is a GSAP bug.. In the SplitText Docs it states:
:

NOTES / LIMITATIONS
- SplitText only recognizes raw text and <br> tags, not child elements like <strong> or <em> elements.

:

Looks like you are not using a real break tag <br> .. but using the HTML entity for greater than, less than sign and wrapping it around br .. <br> .. When you do that it is not a real HTML <br> tag. When you write greater or less than as HTML entities, than they will not be treated as a <br> HTML tag within an HTML document.

 

Is there any reason why you are not just writing the break tag like <br> instead of using a HTML entity?

 

Why not use the HTML break tag <br> instead of the HTML entity for greater than and less than sign with br?

 

You can see split text work with a real <br> tag:

See the Pen amvAy by jonathan (@jonathan) on CodePen

 

:)

Link to comment
Share on other sites

My point is that this isn't a br tag. it should just be considered ordinary plain text and thus should display as <br>. Instead, it displays as {{LT}}br>

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×