Commit graph

20 commits

Author SHA1 Message Date
ArthurHoaro b858332f9f
Fix a bug when using '/' as a tag separator (#1953) 2023-03-18 11:59:00 -04:00
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 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 88a8e284b2 Fix metadata extract regex (2)
Reference: https://stackoverflow.com/questions/8055727/negating-a-backreference-in-regular-expressions

Fixes #1656
2020-12-17 13:56:24 +01:00
ArthurHoaro 53054b2bf6 Apply PHP Code Beautifier on source code for linter automatic fixes 2020-11-09 10:56:24 +01:00
ArthurHoaro d9d71b10c3
Merge pull request #1621 from ArthurHoaro/feature/tag-separators 2020-11-08 14:07:33 +01:00
ArthurHoaro 00d3dd91ef Fix an issue truncating extracted metadata content
Previous regex forced the selection to stop at either the first single or double quote found, regardless of the opening quote. Using '\1', we're sure to wait for the proper quote before stopping the capture.
2020-11-08 13:54:39 +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 458b6b9918
Merge pull request #1540 from ArthurHoaro/fix/metadata-regexes
Improve regex to extract HTML metadata (title, description, etc.)
2020-10-13 12:26:55 +02:00
ArthurHoaro 1ea09a1b8b Fix warning if the encoding retrieved from external headers is invalid
Also fixed the regex to support this failing header: charset="utf-8"\r\n"
2020-09-30 11:11:19 +02:00
ArthurHoaro 2cd0509b50 Improve regex to extract HTML metadata (title, description, etc.)
Also added a bunch of tests to cover more use cases.

Fixes #1375
2020-09-03 17:46:26 +02:00
ArthurHoaro c22fa57a55 Handle shaare creation/edition/deletion through Slim controllers 2020-07-23 21:19:21 +02:00
ArthurHoaro 03340c18ea Slim router: handle add tag route 2020-07-23 21:19:21 +02: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
ArthurHoaro 6a4872520c Automatically retrieve description for new bookmarks
If the option is enabled, it will try to find a meta tag containing
the page description and keywords, just like we do for the page title.
It will either look for regular meta tag or OpenGraph ones.

The option is disabled by default.

Note that keywords meta tags is mostly not used.

In `configure` template, the variable associated with this setting
is `$retrieve_description`.

Fixes #1302
2019-07-06 12:21:52 +02:00
ArthurHoaro cc69aad4a9
Merge pull request #1271 from ArthurHoaro/hotfix/thumb-note-retrieve
Do not try to retrieve thumbnails for internal link
2019-03-02 10:54:06 +01:00
ArthurHoaro a8e7da0114 Do not try to retrieve thumbnails for internal link
Also adds a helper function to determine if a link is a note and apply it across multiple files.
2019-02-24 12:25:50 +01:00
ArthurHoaro 520d29578c Remove the redirector setting
Fixes #1239
2019-02-09 13:55:11 +01:00
VirtualTam fe3713d2e5 namespacing: move LinkUtils along \Shaarli\Bookmark classes
Signed-off-by: VirtualTam <virtualtam@flibidi.net>
2019-01-12 22:47:48 +01:00
Renamed from application/LinkUtils.php (Browse further)