32 Commits

Author SHA1 Message Date
Quentin Schulz
f4888f6831 themes: fix URI matching used for deciding if URI's local in menu
We want to distinguish between URI references ("local" pages), such as
path/to/another/page/of/my/website, from the other ones, such as
https://example.com in the menu to know how to build the URL.

The issue is that we did the distinction between the two by checking if
the string starts with "http".
Unfortunately, it does not match other valid URI schemes. One example is
mailto:address@example.com to open a mail client with the recipient
being address@example.com.
There are many other valid URI schemes (tel, ftp, irc, ...).
Under the current code, we think anything that isn't started by "http"
is local, i.e. we need to append the string to the parent path of the
current page.
This means that we have
https://mywebsite.example.com/mailto:address@example.com linked in the
menu instead of the expected mailto:address@example.com.

Let's fix that with a very simple test. A URI reference is commonly
detected as anything that does not contain a scheme (which has to be
suffixed by ':') or if it does, that the given path starts with './'.

This is most likely not handling all the cases but at least most of the
common ones.

Please refer to the RFC for further information:
https://www.rfc-editor.org/rfc/rfc3986.txt

Signed-off-by: Quentin Schulz <foss@0leil.net>
2019-03-20 20:56:16 +00:00
Adrien Beudin
aee9953687 fix light theme 2018-03-28 10:40:31 +02:00
Adrien Beudin
70b5e5e90c night mode for exposure 2018-02-27 13:53:48 +01:00
Adrien Beudin
080e50f318 [fix] refactor encryption function 2017-10-04 00:44:47 +02:00
Adrien Beudin
f53b175939 [fix] index css 2017-10-03 05:08:56 +02:00
Adrien Beudin
f2396c32a5 [enh] auto login 2017-10-03 00:43:29 +02:00
Adrien Beudin
590582aea2 [fix] audio section in light mode 2017-09-29 04:50:37 +02:00
Adrien Beudin
e19c64393a [fix] encrypt the light page 2017-09-29 04:48:37 +02:00
Adrien Beudin
fe83ad3664 add floating image in paragraph section 2017-05-23 13:44:26 +02:00
Adrien Beudin
3da2f92049 remove youtube section on iframe 2017-05-15 14:05:26 +02:00
Adrien Beudin
f15943c9c8 fix build page 2017-05-06 10:17:46 +02:00
Adrien Beudin
0749e9fec2 fix youtube section + add docs 2017-05-03 19:19:55 +02:00
abeudin
5358d06365 Merge pull request #75 from Psycojoker/youtube
Youtube + update material + fix
2017-05-03 19:08:57 +02:00
Adrien Beudin
fdc948b14b fix video on light theme 2017-05-03 19:04:16 +02:00
Adrien Beudin
dc7b297141 youtube on light theme 2017-05-03 18:49:55 +02:00
Adrien Beudin
810d9ba4c9 fix ffmpeg code 2017-04-25 16:24:41 +02:00
Adrien Beudin
f5eaf8daf1 fix some bugs with audio 2017-04-23 16:04:56 +02:00
Adrien Beudin
8412fdf9f0 fix light mode with audio 2017-03-06 10:17:27 +01:00
Adrien Beudin
a3c0853d0d audio in light mode 2017-03-06 10:01:53 +01:00
Adrien Beudin
0ecd4cde5f reduce size of cover 2016-11-04 15:02:18 +01:00
Adrien Beudin
b57efe00c9 reduce size of cover 2016-11-04 14:55:04 +01:00
Adrien Beudin
1d04ef306a fix url of og:image 2016-11-04 14:47:47 +01:00
Adrien Beudin
d29a75fbba add rss in light theme 2016-11-04 14:43:09 +01:00
Adrien Beudin
7c8d17fbcb fix bug og:image 2016-11-04 14:37:46 +01:00
Adrien Beudin
a465fdfe69 add support of Open Graph 2016-11-04 12:55:02 +01:00
Titoko
f2da9ccb65 Add a back button in subIndex 2016-11-02 19:25:40 +01:00
Adrien Beudin
78fd2cf8fd light thme can be use for principal theme 2016-10-31 14:20:43 +01:00
Adrien Beudin
b7edcfcb08 enable light mode 2016-05-27 11:57:03 +02:00
Adrien Beudin
b5085247df fix light theme 2016-05-27 10:04:19 +02:00
Adrien Beudin
b3fbc74900 remove unless files 2016-05-26 22:13:17 +02:00
Adrien Beudin
842b68ad2f update light theme 2016-05-26 22:08:55 +02:00
Adrien Beudin
99cd0aa623 add light theme init 2016-05-26 17:04:57 +02:00