Commit graph

2292 commits

Author SHA1 Message Date
yudete
5256b42870 Update translations (Japanese) 2020-10-19 10:25:51 +09:00
yudete
52e27a96a4 Update translations (Japanese) 2020-10-19 10:17:35 +09:00
ArthurHoaro
6866ed766f
Merge pull request #1588 from ArthurHoaro/feature/search-highlight 2020-10-16 20:40:49 +02:00
ArthurHoaro
f1a148ab92 add search highlight unit tests 2020-10-16 20:31:49 +02: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
64cac25626
Merge pull request #1596 from ArthurHoaro/feature/better-rename-tag
Improve Manage tags page
2020-10-16 20:15:19 +02:00
ArthurHoaro
3cb4e8a44c Improve Manage tags page
Fixes #1125
2020-10-16 20:03:25 +02:00
ArthurHoaro
81c9df1363
Merge pull request #1593 from ArthurHoaro/fix/no-url-rewriting 2020-10-16 19:26:03 +02:00
ArthurHoaro
7836ed9b2e Doc: typo 2020-10-16 19:20:45 +02:00
ArthurHoaro
3adbdc2a83 Inject ROOT_PATH in plugin instead of regenerating it everywhere 2020-10-16 13:06:06 +02:00
ArthurHoaro
7f5250421b Support using Shaarli without URL rewriting
- Shaarli can be fully used by prefixing any URL with /index.php/
   - {$base_path} used in templates already works with this configuration
   - Assets path (outside of theme's assets) must be prefixed with {$root_url}/
   - Documentation section in « Server configuration »

Fixes #1590
2020-10-16 12:47:11 +02:00
ArthurHoaro
cd2878edee
Merge pull request #1592 from ArthurHoaro/fix/strict-type-daily
Strict types: fix an issue in daily where the date could be an int
2020-10-16 12:16:54 +02:00
ArthurHoaro
4b3aca6623 Strict types: fix an issue in daily where the date could be an int 2020-10-16 12:04:46 +02:00
ArthurHoaro
5334090be0 Improve metadata retrieval (performances and accuracy)
- Use dedicated function to download headers to avoid apply multiple regexps on headers
  - Also try to extract title from meta tags
2020-10-15 11:36:56 +02:00
ArthurHoaro
4cf3564d28 Add a setting to retrieve bookmark metadata asynchrounously
- There is a new standalone script (metadata.js) which requests
    a new controller to get bookmark metadata and fill the form async
  - This feature is enabled with the new setting: general.enable_async_metadata
    (enabled by default)
  - general.retrieve_description is now enabled by default
  - A small rotating loader animation has a been added to bookmark inputs
    when metadata is being retrieved (default template)
  - Custom JS htmlentities has been removed and  mathiasbynens/he
    library is used instead

Fixes #1563
2020-10-15 09:08:46 +02:00
ArthurHoaro
f34554c6c2
Merge pull request #1591 from ArthurHoaro/doc/server-conf-php-v
Doc: add PHP 7.4 and 8.0 as supported version
2020-10-15 09:06:27 +02:00
ArthurHoaro
ec45749187 Doc: add PHP 7.4 and 8.0 as supported version 2020-10-15 09:01:41 +02:00
ArthurHoaro
4a26974a4b
Merge pull request #1583 from ArthurHoaro/feature/bookmark-strict-types
Add strict types for bookmarks management
2020-10-13 13:56:07 +02:00
ArthurHoaro
efb7d21b52 Add strict types for bookmarks management
Parameters typing and using strict types overall increase the codebase
quality by enforcing the a given parameter will have the expected type.

It also removes the need to unnecessary unit tests checking methods
behavior with invalid input.
2020-10-13 13:50:11 +02:00
ArthurHoaro
29c31b7ec6
Merge pull request #1570 from ArthurHoaro/feature/datastore-mutex
Add mutex on datastore I/O operations
2020-10-13 13:30:37 +02:00
ArthurHoaro
fd1ddad98d Add mutex on datastore I/O operations
To make sure that there is no concurrent operation on the datastore file.

Fixes #1132
2020-10-13 12:38:19 +02: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
543b16b4f4
Merge pull request #1525 from ArthurHoaro/feature/rest-api-bookmark-dates
REST API: allow override of creation and update dates
2020-10-13 12:26:01 +02:00
ArthurHoaro
8f269b49d7
Merge pull request #1521 from ArthurHoaro/feature/markdown-extra
Add Markdown Extra formatter
2020-10-13 12:25: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
84045ffbb1 Update badge versions 2020-10-13 12:01:19 +02:00
ArthurHoaro
64152387d6
Merge pull request #1589 from ArthurHoaro/changelog/v0.12.0
CHANGELOG and AUTHORS for v0.12.0
2020-10-13 11:49:07 +02:00
ArthurHoaro
2d015d79b7 CHANGELOG and AUTHORS for v0.12.0 2020-10-13 11:44:31 +02:00
ArthurHoaro
3020310dd0
Merge pull request #1586 from ArthurHoaro/changelog/v0.12.0-beta-2
CHANGELOG and AUTHORS for v0.12.0-beta-2
2020-10-08 08:54:19 +02:00
ArthurHoaro
b028f0869f CHANGELOG and AUTHORS for v0.12.0-beta-2 2020-10-08 08:41:30 +02:00
ArthurHoaro
7f1bb5553b
Merge pull request #1585 from ArthurHoaro/fix/xss-and-tag-search
Security: fix multiple XSS vulnerabilities + fix search tags with special chars
2020-10-08 08:19:06 +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
nodiscc
df25b28dcd
Merge pull request #1579 from sprak3000/issue-1437-tag-sort-buttons-ui
Fix #1437 - Make tag cloud/list views buttons more obvious
2020-10-04 11:45:24 +00:00
nodiscc
fc4d1b6796
Merge pull request #1581 from nodiscc/compose-traefik-version
docker-compose.yml: pin traefik image to 1.7-alpine
2020-10-04 11:33:57 +00:00
nodiscc
bb176441cb docker-compose.yml: pin traefik image to 1.7-alpine
- fixes https://github.com/shaarli/Shaarli/issues/1493
- https://hub.docker.com/_/traefik/
2020-10-03 14:35:06 +02:00
ArthurHoaro
7b18876361
Merge pull request #1575 from ArthurHoaro/feature/php8 2020-10-03 12:59:16 +02:00
ArthurHoaro
ee07b7283f
Merge pull request #1574 from stoeps13/hosting-fix 2020-10-03 12:59:01 +02:00
sprak3000
f4ea7cd563 Issue #1437 - Make tag cloud/list views buttons more obvious
This work alters the markup and CSS for the tag sort UI to match the button feel filters and links per page uses.
2020-10-02 14:06:02 -04:00
ArthurHoaro
1db2ebbd79
Merge pull request #1577 from ArthurHoaro/fix/edit-zero
Fix a bug preventing to edit bookmark with ID #0
2020-10-02 14:24:07 +02:00
ArthurHoaro
255b2264a1 Revert unrelated changes and add unit tests 2020-09-30 15:57:57 +02:00
ArthurHoaro
80a3efe116 Fix a bug preventing to edit bookmark with ID #0 2020-09-30 15:31:34 +02:00
Christoph Stoettner
25cb75552b Fix identation 2020-09-30 12:29:54 +02:00
Christoph Stoettner
d8ef4a893f Change to ->container->environment 2020-09-30 12:27:44 +02:00
ArthurHoaro
95158e7565
Merge pull request #1576 from ArthurHoaro/release/v0.12.0-beta-1/changelog
Update CHANGELOG and AUTHOR
2020-09-30 11:59:42 +02:00
ArthurHoaro
22e75f062d Update CHANGELOG and AUTHOR 2020-09-30 11:55:51 +02:00
ArthurHoaro
c3fca560b6
Merge pull request #1569 from ArthurHoaro/fix/bad-encoding
Fix warning if the encoding retrieved from external headers is invalid
2020-09-30 11:35:57 +02:00
ArthurHoaro
769a28833b
Merge pull request #1566 from nodiscc/makefile-composer-install
doc/Makefile: remove references to composer update
2020-09-30 11:12:17 +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
d246e2c512 Use assertRegExp polyfill instead of regexMatches 2020-09-29 18:57:25 +02:00
ArthurHoaro
3a49307c3d Ignore PHP deps when removing phpunit in PHP 8.0 environment 2020-09-29 18:57:25 +02:00