Commit graph

18 commits

Author SHA1 Message Date
Hazhar Galeh dbd99f310f
Resolve PHP 8.1 deprecations (#1866)
Co-authored-by: Adrien Crivelli <adrien.crivelli@gmail.com>
Co-authored-by: ArthurHoaro <arthur@hoa.ro>
2022-09-14 08:17:07 +02:00
ArthurHoaro bf8bec322b New Core Plugin: ReadItLater
Create a new core plugin allowing to mark bookmarks to read them later.
When enabled:

  * checkbox is displayed in editlink view for new bookmarks
  * a plugin setting is available to check it or not it by default
  * in bookmark list:
    * new global filter to display only bookmark flagged as read it
      later
    * for each bookmarks, new action icon to toggle read it later status
    * for each « readitlater » bookmark, red label « To Read » added,
      and red line on the right of the bookmark added (default template)

Fixes #143

Signed-off-by: ArthurHoaro <arthur@hoa.ro>
2022-08-12 19:58:07 +02:00
ArthurHoaro b2a43bc861 Search highlight: do not use special characters for tokens
It messes with Markdown syntax (tables in this case).

Fixes #1729
2021-04-05 09:15:25 +02:00
ArthurHoaro a1cd7a3b2f ShaarliParsedown: add PHPDoc/comments 2021-02-04 10:53:23 +01:00
ArthurHoaro 9ef8555ad2 Support search highlights when matching URL content
DefaultFormatter:
  - format 'a' tag content and not href attribute
  - format hashtags properly
Markdown(Extra)Formatter:
  - Extend Parsedown to format highlight properly: https://github.com/erusev/parsedown/wiki/Tutorial:-Create-Extensions

Fixes #1681
2021-01-19 17:49:19 +01:00
ArthurHoaro b99e00f7cd Manually fix remaining PHPCS errors 2020-11-09 10:56:49 +01:00
ArthurHoaro 53054b2bf6 Apply PHP Code Beautifier on source code for linter automatic fixes 2020-11-09 10:56:24 +01:00
ArthurHoaro b3bd8c3e8d Feature: support any tag separator
So it allows to have multiple words tags.

Breaking change: commas ',' are no longer a default separator.

Fixes #594
2020-11-05 17:54:42 +01:00
ArthurHoaro 740b32b520 Default formatter: add a setting to disable auto-linkification
+ update documentation
  + single parameter for both URL and hashtags

Fixes #1094
2020-11-03 12:43:35 +01:00
ArthurHoaro 4e3875c0ce Feature: highlight fulltext search results
How it works:

  1. when a fulltext search is made, Shaarli looks for the first
occurence position of every term matching the search. No change here,
but we store these positions in an array, in Bookmark's additionalContent.
  2. when formatting bookmarks (through BookmarkFormatter
implementation):
    1. first we insert specific tokens at every search result positions
    2. we format the content (escape HTML, apply markdown, etc.)
    3. as a last step, we replace our token with displayable span
elements

Cons: this tightens coupling between search filters and formatters
Pros: it was absolutely necessary not to perform the
search twice. this solution has close to no impact on performances.

Fixes #205
2020-10-16 20:31:12 +02:00
ArthurHoaro 8fabcd0224 Add Markdown Extra formatter
Library: [Parsedown Extra](https://github.com/erusev/parsedown-extra)

Also sort dependencies alphabetically.

Fixes #1169
2020-10-13 12:20:34 +02:00
ArthurHoaro 72fbbcd679 Security: fix multiple XSS vulnerabilities + fix search tags with special chars
XSS vulnerabilities fixed in editlink, linklist, tag.cloud and tag.list.

Also fixed tag search with special characters: urlencode function needs to be applied on raw data, before espaping, otherwise the rendered URL is wrong.
2020-10-06 17:30:18 +02:00
ArthurHoaro 624123177f Include empty basePath in formatting 2020-07-28 21:09:22 +02:00
ArthurHoaro 301c7ab1a0 Better support for notes permalink 2020-07-28 20:46:11 +02:00
ArthurHoaro 03340c18ea Slim router: handle add tag route 2020-07-23 21:19:21 +02:00
ArthurHoaro a39acb2518 Fix an issue with private tags and fix nomarkdown tag
The new bookmark service wasn't handling private tags properly.

nomarkdown tag is now shown only for logged in user in bookmarks, and hidden for everyone in tag clouds/lists.

Fixes #726
2020-01-18 11:39:26 +01:00
ArthurHoaro cf92b4dd15 Apply the new system (Bookmark + Service) to the whole code base
See https://github.com/shaarli/Shaarli/issues/1307
2020-01-18 09:55:59 +01:00
ArthurHoaro 336a28fa4a Introduce Bookmark object and Service layer to retrieve them
See https://github.com/shaarli/Shaarli/issues/1307 for details
2020-01-17 18:42:11 +01:00