This commit makes the heading hierarchy of ocamldoc start at {0 rather
than {1. This level {0 should be reserved for global titles, freeing
the use of {1 for normal subtitles.
This commit adds a new id to classes, modules and module types.
The class id replaces the preexisting name attribute that was intended
to be an id attribute.
This commit replaces most of the use of <br> tags in ocamldoc html
backend by more meaningful tags, in order to improve the themability
of the generated html code.
It is possible to craft comments that can expand to unfiltered HTML
fragments.
For example, the following program:
```ocaml
(** {{: "><script>alert(1)</script>"} } *)
let n = 0
```
Would generate a HTML file containing:
```html
<a href=" "><script>alert(1)</script>""> </a>
```
Using this technique it is possible to leak cookies to a third party.
The fix is not perfect since it does not generate usable documentation,
but the generated HTML is harmless.
Note that input like `{{: javascript:alert(1)} }` will still run
arbitrary JS but requires human interaction.
There is a typo in the generated CSS for link to modules in the index
page. CSS colors should start with `#`.
As a consequence, this also makes the default stylesheet valid according
to <https://jigsaw.w3.org/css-validator>.
With this commit, ocamldoc does not escape anymore space characters
within the <pre> </pre> tags and instead escape space and newline
characters inside <code> </code> when a <pre>-like behavior is desired.
Moreover, the type_* files generated by ocamldoc are correctly assigned
a <pre>-like behavior.
This commit improves support for inline record and associated
documentation within ocamldoc. Note that the support for documentation
on inline record field could be improved in the various ocamldoc
backends.
This should cover all places involving filenames in the compiler.
There are a few more paths still using Latin-1 in other ways,
e.g. in ocamldoc.
From: Peter Zotov <whitequark@whitequark.org>
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@15727 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
According to the reporter 'sliquister', type-specialized comparison
can nearly halve compilation time in some cases. This patch applies
type-specialization throughout the OCaml distribution sources, so not
all changes will have performance utility, but in this case I think
it's best to be consistent, as I see no downside to the change.
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@13410 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02