Philip Peitsch 2c0f8a765e Escape list prefix, suffix and bullet chars in the CSS rules
Various browser cope differently with unescaped characters in a CSS
content block, though all browsers agree it is a bad thing. WebKit
will throw an error, Chrome & FF will "guess" where the rule ends
(and usually get it wrong).

This patch does 2 things to fix this:
- Consistently use double-quotes to quote strings
- Escape backspace and double-quote chars in the CSS-related content

The vast amount of testing code is primarily creating a string tokenizer
able to parse out the displayed text across Chrome/WebKit + FF. As there
is no simple way to get the "rendered text" from a pseudo-element, a lot
of code is required to compute this. There are tests included for the
hand-rolled tokenizer as well to ensure proper function.

No tests have been added for OdfCanvas, as the existing list logic in
here is destined (sooner rather than later) to be merged into the newer
list CSS translation class.
2014-04-30 21:17:23 +10:00
2014-03-27 22:57:45 +11:00
2011-04-20 11:35:22 +02:00

WebODF

WebODF is a JavaScript library created by KO GmbH.

It makes it easy to add Open Document Format (ODF) support to your website and to your mobile or desktop application. It uses HTML and CSS to display ODF documents.

License

WebODF is a Free Software project. All code is available under the AGPL.

If you are interested in using WebODF in your commercial product (and do not want to disclose your sources / obey AGPL), contact KO GmbH for a commercial license.

Creating webodf.js

webodf.js is compiled by using the Closure Compiler. This compiler concatenates and compacts all JavaScript files, so that they are smaller and execute faster. CMake is used to setup the buildsystem, so webodf.js can be created:

git clone https://github.com/kogmbh/WebODF.git webodf
mkdir build
cd build
cmake ../webodf
make webodf.js-target

A successfull run will yield the file "webodf.js" in the subfolder "build/webodf/" (among other things), from where you can then copy it and use for your website.

For building webodf.js on Windows please study "README-Windows.md".

S
Description
Lustro github.com/webodf/WebODF
Readme
23 MiB
Languages
JavaScript 91.6%
HTML 2.2%
C 2%
CMake 1.4%
Objective-C 0.7%
Other 1.9%