smartypants and html title

Marcin Wojdyr avatarMarcin Wojdyr created an issue

I have .rst with title:

.. title:: foo --- bar

and smartypants are enabled: html_use_smartypants = True

All "---"'s in the html body are translated to — but the same symbol in the title is replaced with unicode char 8212 (I'd prefer html entity).

Comments (5)

  1. Marcin Wojdyr
    • changed status to open

    Not if `html_output_encoding` is different than utf-8.

    The related issue is that special html characters (<&) in the title are not escaped. I don't know if it's intended, but at least it's different than in the body.

  2. Georg Brandl

    <&> are certainly escaped in the title. (That may have been a bug in an earlier version.)

    I understand that you cannot put all possible characters in a page encoded with e.g. latin1, but why would you set html_output_encoding to that encoding then?

  3. Log in to comment
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.