Skip to content

Conversation

@jroes
Copy link
Contributor

@jroes jroes commented Mar 27, 2021

Issue: Closes #1117.

Description:

If an object passed to st.write() has a function _repr_html_, write its output as unsafe HTML.

@jroes jroes requested a review from a team March 27, 2021 04:23
@jroes
Copy link
Contributor Author

jroes commented Mar 27, 2021

One small note, it feels more correct to always prefer the object's _repr_html_ over any guesses our code makes, but that results in challenges with the way we customize pandas DataFrames.

Copy link
Collaborator

@kmcgrady kmcgrady left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems like a good solution to have. Marking for product review.

@asaini
Copy link

asaini commented Apr 2, 2021

Looks good. Sorry for the delay. Approve 👍

@jroes jroes merged commit 96f1746 into develop Apr 2, 2021
@kmcgrady kmcgrady deleted the fix-1117 branch April 2, 2021 21:10
kmcgrady added a commit that referenced this pull request Apr 8, 2021
This reverts commit 96f1746, reversing
changes made to 6684e51.
tconkling added a commit that referenced this pull request Apr 19, 2021
* develop:
  Fix Markdown Anchors bugs (#3127)
  Unset fail_on_warning (#3134)
  Remove fail on warning
  Merge pull request #3126 from randyzwitch/docs_test
  Add s4a message to close active modals (#2893)
  Add fail_on_warning to build options
  Docutils 0.16
  Put back Sphinx to 3.0.3
  Modify docs for grammatical error
  Update Changelog to latest updates
  Up version to 0.80.0
  Update change log
  Revert "Merge pull request #3029 from streamlit/fix-1117"
  Merge anchor headers feature branch into develop (#2983)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Support for _repr_html_ property on objects

4 participants