-
Notifications
You must be signed in to change notification settings - Fork 3.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: replace newline(\n) with br for text widgets. #7859
Conversation
@techbhavin looks like the core problem is not the text widget, Can you confirm if this is reproducible on release env, I can seems to do that also in the text widget \n seems to work fine |
@@ -76,6 +76,8 @@ class TextComponent extends React.Component<TextComponentProps> { | |||
textAlign, | |||
textColor, | |||
} = this.props; | |||
let procText = text || ""; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@techbhavin @somangshu what's the proposed fix here?
if we are going to allow break tags shouldn't we allow any html tag that might come from a rick text editor which includes bold, italics, etc?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@marks0351 The fix was actually for the new line character we see in the standup app, I thought the root cause would be the RTE or list widget, But was not able to reproduce this. I am not sure of the above change.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
An issue in the original package here says that
Currently it's impossible to match a string with line breaks because convertLineBreaks replaces all of them with
<br/>
tags which causes the matcher to get get a splitted string.
So how does the above resolve anything?
|
@techbhavin @RakshaKShetty Verified this PR now \n and quotes are not displayed. |
@techbhavin @somangshu Is this PR still required? If not, can we close this PR? I'm asking because I've closed the linked Github issue as non-reproducible. |
@mohanarpit we were just waiting to see if the issue crops up again, This has resolved for now, Closing this now |
Description
Fixes #7497
Type of change
Checklist:
Test coverage results 🧪
🟢 Total coverage has increased