jgm / pandoc

Universal markup converter
https://pandoc.org
Other
33.88k stars 3.34k forks source link

Misleading Encodings of Umlauts in inline links #292

Closed kwizzz closed 12 years ago

kwizzz commented 13 years ago

The conversion of umlauts in inline links to headings via header identifiers causes troubles on Internet Explorer.

Sample:

# This is a headline

Some text here that references to [Ümlauts Bug](#ümlauts-bug)

Lorem ipsum dolor sit am...

# Ümlauts Bug

References to above section do not work. ...

Feed it to pandoc with --toc and it will create the following different HTML hrefs:

TOC: <li><a href="#&#252;mlauts-bug">Ümlauts Bug</a></li>

Inline link: <p>Some text here that references to <a href="#%C3%BCmlauts-bug">Ümlauts Bug</a></p>

Both versions are interpreted as #ümlauts-bug in firefox, but in IE 7 TOC will be #ümlauts-bug while the link will stay #%C3%BCmlauts-bug (security feature in IE?).

Proposal: do the same conversion as it is done for TOC and everything will be fine again.

Pandoc version:

pandoc 1.8.2
Compiled with citeproc support.
Compiled with syntax highlighting support for:
Actionscript, Ada, Alert, Alert_indent, Ansys, Apache, Asn1, Asp, Awk, Bash,
Bibtex, Boo, C, Changelog, Cisco, Cmake, Coffeescript, Coldfusion, Commonlisp,
Cpp, Cs, Css, Cue, D, Desktop, Diff, Djangotemplate, Doxygen, Doxygenlua, Dtd,
Eiffel, Email, Erlang, Fortran, Fsharp, Fstab, Gap, Gdb, Gettext, Gnuassembler,
Go, Haskell, Haxe, Html, Idl, Ilerpg, Ini, Java, Javadoc, Javascript, Json, Jsp,

Latex, Lex, LiterateHaskell, Lua, M3u, Makefile, Mandoc, Matlab, Maxima,
Mediawiki, Metafont, Mips, Modula2, Modula3, Monobasic, Nasm, Noweb, Objectivec,

Objectivecpp, Ocaml, Octave, Pango, Pascal, Perl, Php, Pike, Postscript, Prolog,

Python, R, Relaxngcompact, Rhtml, Ruby, Scala, Scheme, Sci, Sed, Sgml, Sql,
SqlMysql, SqlPostgresql, Tcl, Texinfo, Verilog, Vhdl, Winehq, Wml, Xharbour,
Xml, Xorg, Xslt, Xul, Yacc, Yaml
Copyright (C) 2006-2011 John MacFarlane
Web:  http://johnmacfarlane.net/pandoc
This is free software; see the source for copying conditions.  There is no
warranty, not even for merchantability or fitness for a particular purpose.
jgm commented 12 years ago

Should be fixed by bdec07bac9efb737dbc60e6985d8ba1500a5eeb9.