Responsive images in markdown

This commit is contained in:
Noah 2014-12-16 03:50:42 +00:00
parent 845c47403e
commit bf294e0009
2 changed files with 6 additions and 3 deletions

View File

@ -181,9 +181,6 @@ def format_message(message):
# Comments use Markdown formatting, and HTML tags are escaped by default.
message = render_markdown(message)
# Don't allow commenters to use images.
message = re.sub(r'<img.+?/>', '', message)
# Process emoticons.
message = Emoticons.render(message)
return message

View File

@ -77,6 +77,12 @@ pre, code {
font-size: 10pt;
}
/* Use responsive images in Markdown code. */
.markdown img {
max-width: 100%;
height: auto;
}
/*********************
* Classes used by core Rophako pages. You'll want to
* implement these in your custom layout.