question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

HTML is not working in streamlit.markdown in version 0.80.0

See original GitHub issue

Summary

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:closed
  • Created 2 years ago
  • Comments:8

github_iconTop GitHub Comments

1reaction
vdonatocommented, Apr 16, 2021

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).

1reaction
vdonatocommented, Apr 16, 2021

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 version 0.80.1.dev20210416 gets auto-built in ~12 hours

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found