-
Notifications
You must be signed in to change notification settings - Fork 4k
Closed
Labels
feature:st.infoRelated to the `st.info` elementRelated to the `st.info` elementgood first issueGood for newcomers to the codebaseGood for newcomers to the codebasepriority:P2Medium-high priority - fix within one monthMedium-high priority - fix within one monthstatus:confirmedBug has been confirmed by the Streamlit teamBug has been confirmed by the Streamlit teamtype:bugSomething isn't working as expectedSomething isn't working as expected
Description
Summary
Emojis are not valid if they are prefixed with a variant selector character. This is a hidden character that is used as prefix for the emoji (more information here).
Steps to reproduce
Code snippet:
st.error("This is an error", icon="🚨") # Works fine
st.error("This is an error", icon="️🚨") # Throws an errorThe reason is that the second example is prefix with this hidden unicode character: %uFE0F:
st.write(len("🚨")) # 1
st.write(len("️🚨")) # 2Expected behavior:
Should not raise an exception.
Actual behavior:
Raises a StreamlitAPIException if used for st.error, st.info, ...
Is this a regression?
no
Metadata
Metadata
Assignees
Labels
feature:st.infoRelated to the `st.info` elementRelated to the `st.info` elementgood first issueGood for newcomers to the codebaseGood for newcomers to the codebasepriority:P2Medium-high priority - fix within one monthMedium-high priority - fix within one monthstatus:confirmedBug has been confirmed by the Streamlit teamBug has been confirmed by the Streamlit teamtype:bugSomething isn't working as expectedSomething isn't working as expected