HTML is not working in streamlit.markdown in version 0.80.0
See original GitHub issueSummary
HTML code in st.markdown
was working okay in streamlit version 0.79.0. But with version 0.80.0, it’s not giving the desired output.
Steps to reproduce
Code snippet: (line 32)
import streamlit as st
st.markdown("<h1 style='text-align: center; color: #ff7903; font-family: Solaimanlipi'>গতি-সমীকরণ ক্যালকুলেটর </h1>", unsafe_allow_html=True)
Expected behavior:
The title line গতি-সমীকরণ ক্যালকুলেটর
is expected to be aligned at the center, its text color should be #ff7903
and the font family should be Solaimanlipi
.
Actual behavior:
The title line গতি-সমীকরণ ক্যালকুলেটর
is aligned at the left (also having indentation issue, breaks the left margin in minimized screen), its text color and font-family remain with the default values.
Is this a regression?
This problem didn’t appear in version 0.79.0.
Debug info
- Streamlit version: 0.80.0
- Python version: 3.8.3
- Using Conda
- OS version: Windows 10 Pro
- Browser version: Google Chrome Version 89.0.4389.114 (Official Build) (64-bit)
Additional information
Issue Analytics
- State:
- Created 2 years ago
- Comments:8
Top Results From Across the Web
Parsing error for nested HTML · Issue #3190 - GitHub
No parsing error. ... Error parsing Markdown or HTML in this string: ... Streamlit version: 0.80.0, but the same is true for 0.80.1....
Read more >Changelog - Streamlit Docs
This page lists highlights, bug fixes, and known issues for official Streamlit ... Improvements to our markdown library to provide better support for...
Read more >St.markdown is not working properly on streamlit version 1.7.0
Hi All, We have an application built using streamlit and we use st.markdown extensively. I am testing the changes on after version upgrade ......
Read more >HTML Code Works Different In Streamlit (General Problem)
Markdown will render plain html and utilize <style> tags fine, but won't run scripts. from streamlit.components.v1 import html html('<script> ..
Read more >Are you using HTML in Markdown? Tell us why! - Streamlit
As described in this Github issue, it is very easy to write unsafe apps when developers have the ability to code in HTML....
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Yep, that’s correct. the fix won’t appear until 0.81 is out even with that set in your requirements file (and you may have to restart your app after the release so that it applies).
Hi @rafisics, the fix is merged but won’t appear until 0.81 is released (there don’t seem to be enough people running into this to warrant releasing a patch).
While you wait for the fix to be included in 0.81, another alternative to your workaround would be to try the
streamlit-nightly
package, which will include the fix when version0.80.1.dev20210416
gets auto-built in ~12 hours