St.expander markdown does not work with links


st.expander does not show links as expected from documentation

Steps to reproduce

Code snippet:

import streamlit as st

with st.expander(label=""):
    st.write("No text or url shown")

with st.expander(label="[My Markdown Link]('')"):
    st.write("My Markdown Link not being displayed")

with st.expander(label="**My Markdown**"):
    st.write("Regular Bold Text shows")

Expected behavior:

Show the link inside the expander label, using markdown similar to st.markdown("[My Markdown Link](")

Actual behavior:

Debug info

  • Streamlit version: 1.17.0
  • Python version: 3.10.9
  • Conda
  • OS version: Mac
  • Browser version: Brave

Link to GitHub issue I created


I can confirm the issue. This is a regression, the code works as expected in this app:

Which is deployed with Streamlit 1.15.2 at the moment of writing this.

Same issue with checkboxes - based on documentation the label should support links, but it doesnโ€™t - i.e the following line doesnโ€™t show correctly:
link = st.checkbox("this is a [link](")

I checked now in, cannot create a checkbox with a link in its label

That is because the application has been rebooted and now it runs on streamlit 1.17.0.