Commit Graph

126 Commits

Author SHA1 Message Date
Christophe HENRY 8e74403bc4 Fixes bug about CSS not applied correctly
The default CSS was loaded anyway, in addition to the custom css.
2022-08-02 08:41:18 +02:00
Christophe HENRY 211518e098 Fixes a bug about null by ref variable 2022-08-02 08:41:18 +02:00
Christophe HENRY 0079c31e14 Updates changelog 2022-07-26 00:03:21 +02:00
Christophe HENRY 76ed024bbd Updates the Changelog 2021-04-11 22:32:58 +02:00
Christophe HENRY c11af12551 Adds the url path
* The /htmgem directory can be renamed and moved.
* Everything works without URL rewriting enabled.
2021-04-11 21:37:50 +02:00
Christophe HENRY a9fb49802a FIX adds alt property to preformated text in HTML 2021-04-05 11:46:22 +02:00
Christophe HENRY 8cf174ecb3 Handles line feeds: Unix, Mac, Windows 2021-04-05 11:46:22 +02:00
Christophe HENRY cf54d98c61 Converts files from UTF-16 and UTF-32 to UTF-8
The resulting file (HTML) is in UTF-8.
2021-04-05 11:46:22 +02:00
Christophe HENRY 6a8c220716 Opens external links in new windows 2021-04-03 20:40:59 +02:00
Christophe HENRY 9471816b1e Removes useless statement 2021-04-02 23:37:49 +02:00
Christophe HENRY 26ad4f7d98 Adds strict_types=1 2021-04-02 21:29:46 +02:00
Christophe HENRY f4e71cb2b6 Refactores and add tests for url resolving 2021-04-02 21:00:09 +02:00
Christophe HENRY ba5e465e17 Adds lang="" to raise no error on HTML validation 2021-03-30 10:01:50 +02:00
Christophe HENRY a4a647d8e8 Updates changelog 2021-03-29 11:32:19 +02:00
Christophe HENRY 1f38941e7f Adds index.htm in case of Php not activated 2021-03-28 22:44:48 +02:00
Christophe HENRY a24eb12df6 Ends BNF translation 2021-03-28 22:44:05 +02:00
Christophe HENRY 9471c43674 Enables browsing without URL Rewriting 2021-03-28 22:41:45 +02:00
Christophe HENRY 733450cb35 Translation to English 2021-03-27 23:31:47 +01:00
Christophe HENRY 98e7098f29 refactoring, adds debug.css 2021-03-27 21:30:19 +01:00
Christophe HENRY 76b27065ac Refactores the French documentation 2021-03-25 23:47:12 +01:00
Christophe HENRY 731aa3bda2 Don't compress spaces for preformated text 2021-03-25 23:33:48 +01:00
Christophe HENRY 5d74578efc typo 2021-03-25 22:39:52 +01:00
Christophe HENRY 2261dac656 FIX: translate_to_gemtext.php 2021-03-25 19:08:57 +01:00
Christophe HENRY c858b733f4 Replaces several spaces to only one 2021-03-25 15:24:51 +01:00
Christophe HENRY 91abafdce0 FIX: each blockquote lines are in <p> 2021-03-25 12:22:39 +01:00
Christophe HENRY c37549d50c Updates text.gmi.html to validate the unit testing
The file 'text.gmi.html' has to be changed for unit testing because the
quotes have been escaped since then.
2021-03-24 11:22:23 +01:00
Christophe HENRY 7b58fc1a26 Merge remote-tracking branch master into dev 2021-03-24 11:18:57 +01:00
Christophe HENRY 64b5c1506a Updates changelog 2021-03-24 11:09:37 +01:00
Christophe HENRY 750632eaff Corrects the engine after unit testing
gemTextParser
* Removes the last empty lines of text files.
* Removes the last spaces (rtrim) even on preformated texts.
* Lines like "# " are possible, meaning an empty title.
* The line "=>" means an empty link.

GemtextTranslate_gemtext
* FIX: writes the alt text of preformated blocks
* Adds a space when quotation lines have value, otherwise lets ">".
* Adds a space when the link has values, otherwise not.
* A bit of reformating
2021-03-24 10:58:54 +01:00
Christophe HENRY 46d239b8b3 Adds unit tests 2021-03-24 10:53:12 +01:00
Christophe HENRY 4e42fed6b4 Adds null space between two slashes 2021-03-21 00:21:41 +01:00
Christophe HENRY c1299a2bdb FIX: adds line feed inside a blockquote
Example:
> line_1
> line_2

Before :
line_1 line_2

After :
Line_1
Line_2
2021-03-21 00:14:55 +01:00
Christophe HENRY b7276e12e3 Removes unuseful case 2021-03-20 23:58:43 +01:00
Christophe HENRY 710bd1bf07 Corrects blockquote size on mobile 2021-03-20 22:41:04 +00:00
Christophe HENRY 731a8eef6a Escapes the quotes and enable double encode 2021-03-20 15:21:43 +01:00
Christophe HENRY 0e508a7d57 Removes ob_* functions 2021-03-19 17:54:24 +01:00
Christophe HENRY 66720ed63f Changes some items in CHANGELOG 2021-03-19 17:54:21 +01:00
Christophe HENRY 5df9d5ff15 FIX: textDecoration switch not updated 2021-03-19 17:49:21 +01:00
Christophe HENRY cef2417f91
v1.2.0
* Removes "^" to disable text decoration line-wise.
* CSS is no longer incorporated in the HTML page.
* Perform sanity checks against unauthorized file access.
* Properly close tags when the page exists in a non-null mode.
* Split HTML generation in two: parsing and translating.
* Create classes to handle gemtext parsing and translating.
* Create class to generate back gemtext (for future test cases).
* Fix: 404 doesn't occur for an empty file.
* Page 404 fully generated by HtmGem itself.
2021-03-19 10:41:25 +01:00
Christophe HENRY f29cf3a476 Updates changelog 2021-03-19 09:54:02 +01:00
Christophe HENRY 232cecc398 Enable security on what gmi file the client asks.
* checks realPath() against no-existent files,
* checks the file suffix '.gmi'
* checks the directory belongs to that of the site.
2021-03-18 22:06:00 +01:00
Christophe HENRY 365c855c00 Adds icons in the 404 page 2021-03-18 22:05:48 +01:00
Christophe HENRY d280ceff94 WIP 2021-03-18 22:04:31 +01:00
Christophe HENRY 859b0aad81 Deep refactoring: parsing, translating, classes
* Removes "^" to disable text decoration line-wise.
* Split HTML generation in two: parsing and translating.
* Create class to handle gemtext parsing.
* Create class to translate to HTML.
* Create class to generate back gemtext (for future test cases).
* Uses generators to parse then translate.
* Fix: 404 doesn't occur for an empty file.
* Page 404 fully generated by HtmGem itself.
* CSS is no longer incorporated in the HTML page.
* Handle CSS inclusion by addCss() calls.
2021-03-18 22:03:44 +01:00
Christophe HENRY b2e09c54f5 FIX empty 404 and source file access
An empty existing file triggered 404 error.

It was possible to get the source of any file (including .php).
2021-03-18 15:55:49 +01:00
Christophe HENRY 087c2b5e6c Changes the repository from Framasoft to Tildegit
The framasoft Git service will soon disappear.
2021-03-17 22:53:12 +01:00
Christophe HENRY 9726203d07 Split index.php into two files to isolate the lib 2021-03-16 15:00:02 +01:00
Christophe HENRY 01efc79930 Roadmap for v1 2021-03-16 01:08:22 +01:00
Christophe HENRY 8710552d27 Removes margin of PRE 2021-03-14 10:48:25 +00:00
Christophe HENRY d12192bb1f v1.1.0
* File download when using "source" as a style.
 * Improves the regex.
 * Fixes 404 page text decoration, adds reload message.
 * Links to download htmgem-master.zip.
 * Links CHANGELOG and COPYING into index.gmi.
 * Styles improvement, creation of raw.css.
 * Rewording of texts
 -----BEGIN PGP SIGNATURE-----
 
 iQJQBAABCgA6FiEEzDX71ob8wkH7CWZFqiQlK53WhPAFAmBN4eQcHGNocmlzdG9w
 aGUuaGVucnlAc2Jnb2Rpbi5mcgAKCRCqJCUrndaE8DRsD/9q4LvoRI5Rw47UvS2J
 GfEtFBW11H1sFRmXkaxsqO3OIyv5gbAtHTCkxVFn8AbTLTjqiVhLXB/PF9a+tLRm
 PC0DWpFeKtCqi/pdBaIx1KRqSfcWF2EQNVW+V607nmv/Qv8mlxMsZboOVCihQpPR
 yAIaGu/tZgjBMeVoprDSECKS0CraFUQHasi9O4791MMPuQRM76nAr2zUvQPm1kj0
 CM6x+zPAdACN/nIWbtjslB23hXHMxkBQpaLrmIDMv4Em1TVgU41d/80BbAf2kOve
 QVnjtATGtZZKWMIPppIxSvTBftAhFNyB2gYFt7V/E0tSXvNy9Rdec2ShjxO/5Fc/
 c1DCJbllUZ41UNf2On1MNrJANq+EbOjAuPKO1hwEEOjLdzJQkLdfSD4nz0GDsc3j
 BFYidJ5jc5Kq3yWa6ysH4cDqCZirC78Q/jRMMJPaR9ylMWpxnDXTmS2mcot7esys
 iY70G8b04Xsy29PHyors7UtN8ezBTaTgL9VtBK7TnfGT6tSqlSnbrx+4K+DFf7ia
 PAXT/+dlp1QyYdysl0cuUU8oICYMnOsSSflBUQHrBHNMzhXUMQjkkF27aukzNbJ3
 PU7SUFLukTctx2Wbe3Upe5wZG05toCgOYcOhBeFisFK00w82nBSP/zGEovaCMrYC
 UhUktfmU6mwKhnGtpMKYOYUZNQ==
 =WwgD
 -----END PGP SIGNATURE-----

Merge tag 'v1.1.0' into dev

v1.1.0

* File download when using "source" as a style.
* Improves the regex.
* Fixes 404 page text decoration, adds reload message.
* Links to download htmgem-master.zip.
* Links CHANGELOG and COPYING into index.gmi.
* Styles improvement, creation of raw.css.
* Rewording of texts
2021-03-14 11:44:52 +01:00