enh(javascript,file): Allow creating javascript and file links

fixes #832
fixes #1468

Signed-off-by: Marcel Klehr <mklehr@gmx.net>
This commit is contained in:
Marcel Klehr
2023-08-16 20:19:22 +02:00
parent c9153a22e7
commit f6ec244152
16 changed files with 123 additions and 47 deletions

View File

@ -14,7 +14,14 @@ A bookmark has at least the following properties
.. object:: Bookmark
:param int id: The bookmarks unique id
:param string url: The Uniform Resource Locator that this bookmark represents
:param string url: The Uniform Resource Locator that this bookmark represents, can be a http, ftp or (since v13.1.0) a file link
.. versionchanged:: 13.1.0
:param string target: The target of this bookmark, can be a http, ftp or file link or a javascript link
.. versionadded:: 13.1.0
:param string title: A short humanly readable label for the bookmark
:param string description: A longer description or note on the bookmark
:param int added: The UNIX timestamp when this bookmark was created

View File

@ -5,6 +5,16 @@ Changes
.. _changes:
Changes in v13.1.0
==================
In v13.1.0 the ``target`` field for bookmarks was introduced, which largely replaces the ``url`` field.
The ``url`` field still exists and can be used, however, while the ``url`` field is guaranteed to only contain http(s), (s)ftp and file links,
the ``target`` field may also contain javascript links. If a bookmark represents a javascript link, the ``url`` field will be set to the empty string.
The ``target`` field was introduced as a security consideration taking into account downstream implementors of this API that
may expose the contents of the ``url`` field directly as links that users click on, and which do not expect this field to contain javascript.
Breaking changes from v2.x to v3.x
==================================