mirror of
https://github.com/ihabunek/toot
synced 2025-02-03 12:47:32 +01:00
Denis Laxalde
0f6bd920c3
Replace ' by "'" before parsing HTML
Beautiful will does not parse HTML entities like `'` as we expect and the previous logic of replacing this *after* HTML parsing occurred did not produced expected results. To illustrate this, we change data in "test_timeline" to include a literal `'` as it sometimes occur in data returned by Mastodon API. New HTML content is: <p>The computer can't tell you the emotional story [...] </p> Beautiful will parse this as as: <p>The computer can&apost tell you the emotional story [...] </p> which is not what we expect. We fix this by replacing `'` *before* HTML parsing by Beautiful. Since test data in "test_timeline" got updated we also add an extra assertion checking that part of the content with a literal "'" is (still) properly rendered.
============================ Toot - a Mastodon CLI client ============================ .. image:: https://raw.githubusercontent.com/ihabunek/toot/master/trumpet.png Interact with Mastodon social network from the command line. .. image:: https://img.shields.io/travis/ihabunek/toot.svg?maxAge=3600&style=flat-square :target: https://travis-ci.org/ihabunek/toot .. image:: https://img.shields.io/badge/author-%40ihabunek-blue.svg?maxAge=3600&style=flat-square :target: https://mastodon.social/@ihabunek .. image:: https://img.shields.io/github/license/ihabunek/toot.svg?maxAge=3600&style=flat-square :target: https://opensource.org/licenses/MIT .. image:: https://img.shields.io/pypi/v/toot.svg?maxAge=3600&style=flat-square :target: https://pypi.python.org/pypi/toot Documentation ------------- Documentation is hosted on readthedocs.io. Check it out for instruction on installation, usage and more. https://toot.readthedocs.io/en/latest/ Features -------- * Posting, replying, deleting statuses * Support for media uploads, spoiler text, sensitive content * Search by account or hash tag * Following, muting and blocking accounts * Simple switching between authenticated in Mastodon accounts Curses UI --------- toot has an experimental curses based console UI. .. image :: https://raw.githubusercontent.com/ihabunek/toot/master/docs/_static/curses.png License ------- Copyright 2018 Ivan Habunek <ivan@habunek.com> Licensed under `GPLv3 <http://www.gnu.org/licenses/gpl-3.0.html>`_, see `LICENSE <LICENSE>`_.
Languages
Python
99.6%
Makefile
0.3%