You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
After trying to call IconTextView.setText with text that contains { } in reversed order,i.e.:
text}{
text}text{text
ParsingUtil fails with error:
java.lang.StringIndexOutOfBoundsException: length=37; regionStart=36; regionLength=-37
at java.lang.String.startEndAndLength(String.java:504)
at java.lang.String.substring(String.java:1333)
at com.joanzapata.iconify.internal.ParsingUtil.recursivePrepareSpannableIndexes(ParsingUtil.java:103)
at com.joanzapata.iconify.internal.ParsingUtil.parse(ParsingUtil.java:37)
at com.joanzapata.iconify.Iconify.compute(Iconify.java:59)
at com.joanzapata.iconify.widget.IconTextView.setText(IconTextView.java:34)
I am aware that { } is a pattern. But I believe reversed order of } { could be detected by the parser to avoid the crash.
In my case this part of iconified text comes from user input, so I am forced to sanitize the text.
The text was updated successfully, but these errors were encountered:
After trying to call IconTextView.setText with text that contains { } in reversed order,i.e.:
text}{
text}text{text
ParsingUtil fails with error:
I am aware that { } is a pattern. But I believe reversed order of } { could be detected by the parser to avoid the crash.
In my case this part of iconified text comes from user input, so I am forced to sanitize the text.
The text was updated successfully, but these errors were encountered: