Commit graph

152 commits

Author SHA1 Message Date
ArthurHoaro
dd6794cff8 Fix feed permalink rendering with markdown escape set to true
Fixes #1134
2018-05-19 12:55:43 +02:00
Dennis Verspuij
b525810c14 Fix removal of on=... attributes from html generated from markdown 2018-03-19 10:01:20 +00:00
c111704f8c Auto add link to contact page if contact.php exist 2018-02-13 14:46:06 +01:00
7a4ff2cd78 Add thumbshot key 2018-02-13 11:41:56 +01:00
ba04c60849 Fix markdown editor with myShaarli plugin 2018-02-09 15:56:22 +01:00
kalvn
50142efd1b Executes daily hooks before creating columns. 2018-02-01 13:16:58 +01:00
95d55e9ea2 Fix bad field template 2018-01-04 15:10:22 +01:00
a31f09001f Fix bad field template 2018-01-04 15:07:42 +01:00
0e94b7b7f8 Add origin plugin 2018-01-04 14:49:40 +01:00
e37a7ab9ec Add myShaarli plugin 2018-01-04 14:49:09 +01:00
ArthurHoaro
6a65bc5798 Translations : Working demo example of translation extension 2017-10-22 13:16:56 +02:00
ArthurHoaro
12266213d0 Shaarli's translation
* translation system and unit tests
 * Translations everywhere

Dont use translation merge

It is not available with PHP builtin gettext, so it would have lead to inconsistency.
2017-10-22 12:55:03 +02:00
Willi Eggeling
cc8f572bc0 migrated Github wiki links to readthedocs 2017-08-26 09:40:57 +02:00
ArthurHoaro
86ceea054f Add a whitelist of protocols for URLs
- for Shaare
 - for markdown description links and images

Not whitelisted protocols will be replaced by `http://`
2017-05-25 14:58:34 +02:00
ArthurHoaro
8e33d0e767 Remove readityourself plugin
Fixes #818
2017-04-01 12:32:43 +02:00
ArthurHoaro
b9b41d25e3 Remove inline JS and add LibreJS headers in JS files
Fixes #33 (wow!)
Relates to #395
2017-03-12 12:45:32 +01:00
ArthurHoaro
fe83d45c46 Fix #773: set Piwik URL protocol 2017-03-11 13:27:02 +01:00
ArthurHoaro
e037610115 Add markdown_escape setting
This setting allows to escape HTML in markdown rendering or not.
The goal behind it is to avoid XSS issue in shared instances.

More info:

  * the setting is set to true by default
  * it is set to false for anyone who already have the plugin enabled
  (avoid breaking existing entries)
  * improve the HTML sanitization when the setting is set to false - but don't consider it XSS proof
  * mention the setting in the plugin README
2017-02-28 19:16:54 +01:00
ArthurHoaro
246d72e143 Fix markdown plugin color overriding 2017-02-27 20:01:54 +01:00
ArthurHoaro
053673cb71 Remove CSS call for addlink toolbar plugin
Fixes #724
2017-01-15 17:50:16 +01:00
VirtualTam
93b1fe54fb Cleanup: explicit method visibility
Signed-off-by: VirtualTam <virtualtam@flibidi.net>
2017-01-05 19:52:04 +01:00
ArthurHoaro
db90dfcbbc Move PubSubHubbub code as a default plugin 2016-12-20 11:41:24 +01:00
ArthurHoaro
e350aa750f Fix typo in markdown plugin meta description 2016-12-18 14:27:32 +01:00
Arthur
9cf93bcfc5 Merge pull request #697 from ArthurHoaro/feature/ids-bis
Link ID refactoring
2016-12-12 03:15:32 +01:00
Arthur
a0d079141e Merge pull request #679 from ArthurHoaro/plugins/header
Improve theme dependent plugin placeholders:
2016-12-12 03:07:13 +01:00
ArthurHoaro
d592daea83 Add a persistent 'shorturl' key to all links
All existing link will keep their permalinks.
New links will have smallhash generated with date+id.

The purpose of this is to avoid collision between links due to their creation date.
2016-12-12 03:03:12 +01:00
ArthurHoaro
01878a75b9 Apply the new ID system accros the whole codebase 2016-12-12 03:03:12 +01:00
Arthur
19b3930ff3 Merge pull request #701 from ArthurHoaro/plugins/md-html-doc
Describe markdown HTML rendering and display a warning
2016-12-03 08:52:12 +01:00
ArthurHoaro
3d8f5cf84b Describe markdown HTML rendering and display a warning
Fixes #688
2016-12-01 12:44:37 +01:00
ArthurHoaro
ba0fd80732 Improve theme dependent plugin placeholders:
- buttons_toolbar: now expect links represented by an array instead of HTML content
  - fields_toolbar: now expect a form represented by an array instead of HTML content
  - action_plugin: now expect links represented by an array instead of HTML content

Default templates updated accordingly
mprove theme dependent plugin placeholders:
2016-12-01 11:38:21 +01:00
ArthurHoaro
266e3fe5c8 Markdown: fixes feed rendering with nomarkdown tag
* make sure we match exactly `nomarkdown` tag
 * pass the whole link data to stripNoMarkdownTag() to:
   * strip the noMD tag in taglist (array)
   * strip the tag in tags (string)

Fixes #689

tmp
2016-11-22 10:26:03 +01:00
ArthurHoaro
989aa439dd Plugins W3C compliance
Add an alt attribute to images
2016-11-05 15:13:32 +01:00
Adrien Oliva
e6c7e33663 Add Piwik Plugin
[PullRequest #677] Change after Review

Fix logic, my bad!
2016-11-02 08:42:06 +01:00
ArthurHoaro
c5941f316a Fix an issue with links not being reversed in code blocks
Fixes #672

+ Markdown to HTML unit test
2016-10-22 11:13:48 +02:00
ArthurHoaro
e680cfea08 Use Composer to import Parsedown library
Reference #613
2016-10-22 11:13:13 +02:00
ArthurHoaro
bf26e7ebcb Isso comments plugin
Use Isso client to let visitors comments on permalinks
2016-10-17 09:23:14 +02:00
ArthurHoaro
7fde6de121 New init function for plugins, supports errors reporting
All plugins can optionally add an init function named `pluginname_init()` which is called when the plugin is loaded.

This function is aware of the config, and can return initialization errors, which are displayed in the header template.

Note that the previous error system hack no longer work.
2016-10-14 13:22:58 +02:00
Teromene
5e148f8a52 Archive.org plugin: do not propose archival of private notes
Fixes #637
2016-10-13 16:37:43 +01:00
VirtualTam
8758bb0ac8 Merge pull request #619 from ArthurHoaro/plugins/param-desc
Add a description to plugin parameters
2016-08-13 14:48:51 +02:00
VirtualTam
db6dec0de1 Fix: add missing final newlines, untabify text
Signed-off-by: VirtualTam <virtualtam@flibidi.net>
2016-08-13 14:22:22 +02:00
ArthurHoaro
876533e868 Add a description to wallabag plugin parameters 2016-08-02 11:12:05 +02:00
Arthur
0c4c7ae818 Merge pull request #558 from ArthurHoaro/hashtag4
Hashtag system
2016-07-09 07:36:23 +02:00
Arthur
649af5b501 Merge pull request #570 from ArthurHoaro/config-manager
Introduce a configuration manager
2016-07-09 07:19:48 +02:00
ArthurHoaro
51def0d849 PluginManager no longer uses singleton pattern 2016-06-11 09:30:56 +02:00
ArthurHoaro
eeea1c3daa Use the configuration manager for wallabag and readityourself plugin 2016-06-11 09:30:56 +02:00
ArthurHoaro
9ccca40189 Hashtag system
* Hashtag are auto-linked with a filter search
  * Supports unicode
  * Compatible with markdown (excluded in code blocks)
2016-06-06 21:04:43 +02:00
ArthurHoaro
8c4e60186d The tag is no longer private
A private tag is never loaded for visitor, making this feature useless.
2016-05-30 18:51:00 +02:00
ArthurHoaro
e8b65d5f35 Markdown: inline code background color 2016-05-13 19:57:01 +02:00
ArthurHoaro
635d38c241 Process feeds content with Markdown 2016-03-26 17:13:58 +01:00
Arthur
1a84bf1e2b Merge pull request #520 from ArthurHoaro/plugins/nomarkdown
Markdown: Add the 'meta-tag' `.nomarkdown` which prevent a shaare fro…
2016-03-26 16:46:04 +01:00
ArthurHoaro
340252ae5d Update markdown plugin README documentation
* Add the `.nomarkdown` section.
  * Update misleading statements.
2016-03-26 16:43:14 +01:00
ArthurHoaro
3ce20d9e84 Markdown: Add the 'meta-tag' .nomarkdown which prevent a shaare from being parsed with markdown
Also add the tag in tag list in edit_link, so it will appear on autocompletion.
2016-03-21 18:46:34 +01:00
ArthurHoaro
bcd078bf0a Plugin: add render_feed hook and call it while generating ATOM and RSS feed.
Create an example of the new hook in the demo plugin.
2016-03-18 19:13:48 +01:00
kalvn
841df2dd55 Avoids populating a markdown empty container if there's no description. 2016-02-28 18:24:30 +01:00
ArthurHoaro
1b0e3c7fdf Fixes #411: remove hardcoded plugin icon size 2016-02-28 14:25:10 +01:00
Arthur
10269bc8c9 Merge pull request #491 from ArthurHoaro/markdown-escape2
Markdown: don't escape content + sanitize sensible tags
2016-02-25 08:52:42 +01:00
ArthurHoaro
2925687e1e Markdown: don't escape content + sanitize sensible tags
Instead of trying to fix broken content for Markdown parsing, parse it unescaped, then sanatize sensible tags such as scripts, etc.
2016-02-19 19:37:13 +01:00
Nicolas Danelon
01abde4f14 adding styles for code & pre tags 2016-02-19 09:58:01 -03:00
ArthurHoaro
9f57d1916c Wallabag plugin: add version parameter in the meta file 2016-02-10 13:08:19 +01:00
ArthurHoaro
1456358240 Fixes forced git changes
Probably related to the introduction of .gitattribute with forced line ending.
2016-01-31 19:22:14 +01:00
Arthur
53603f5823 Merge pull request #388 from ArthurHoaro/pluginadmin
Fixes #378 - Plugin administration UI.
2016-01-31 19:00:13 +01:00
Arthur
893338f0d4 Merge pull request #379 from ArthurHoaro/plugin-markdown
PLUGIN Markdown
2016-01-31 18:57:29 +01:00
ArthurHoaro
dea0ba28f9 Fixes #378 - Plugin administration UI. 2016-01-31 18:54:48 +01:00
VirtualTam
fc17813bd1 tests: add a make target to check file permissions
Additions:
- [makefile] check versioned files are not executable
- [travis]   call the new make target

Signed-off-by: VirtualTam <virtualtam@flibidi.net>
2016-01-17 21:02:24 +01:00
ArthurHoaro
c0a50f3663 Git *wants* to rewrite this file in the exact same way...
Probably a line ending issue...
2016-01-06 20:40:17 +01:00
ArthurHoaro
1be4afacf9 PLUGIN Markdown
Parse link description in Markdown (HTML) before rendering.

      * hard remove of Shaarli's HTML before parsing.
      * Using Parsedown <https://github.com/erusev/parsedown> PHP lib.
      * Includes basic markdown CSS.
      * Style: removed 400px height max limit for shaares.
      * Unit tests.
2016-01-03 17:36:10 +01:00
VirtualTam
defc8a3f03 Merge pull request #417 from ArthurHoaro/wallabag-improve
Wallabag plugin improvement
2016-01-02 20:09:29 +01:00
ArthurHoaro
938d9cce77 Wallabag plugin improvement
* Fixes a bug where URL weren't properly encoded.
  * Adds Wallabag V2 support.
  * Adds a URL function to handle trailing slash.
  * UT.
  * README updated.
2015-12-27 15:30:34 +01:00
VirtualTam
ccb7cf9855 Merge pull request #418 from ArthurHoaro/qrcode-bug
QRCode plugin: use url instead of real_url
2015-12-23 19:50:33 +01:00
ArthurHoaro
49e62f22ad QRCode plugin: use url instead of real_url
Fixes #414 and avoid usage of redirector in QRCode.

Also fixed a bug with URL encoding.
2015-12-22 10:59:41 +01:00
ArthurHoaro
28a4fc546f Fixes QRCode style
* fixes a regression misplacing QRCode popup.
 * adds a 'show' class in JS to handle CSS transition.
2015-12-21 14:01:52 +01:00
VirtualTam
79851b4890 Merge pull request #406 from ArthurHoaro/qrcode-style
Fixes #403 : Remove QRCode in core CSS and fix plugin layout
2015-12-09 01:00:52 +01:00
VirtualTam
2f3e74090a Merge pull request #408 from ArthurHoaro/gototop
Adding a new placeholder in render_footer hook.
2015-12-09 00:55:52 +01:00
ArthurHoaro
40a5f296a6 Adding a new placeholder in render_footer hook.
Allow free elements at the end of the page.
2015-12-08 16:02:46 +01:00
ArthurHoaro
38603b2450 Fixes #403: build the daily page through renderPage()
* new entry in the Router for daily page.
  * add an always displayed button in demo_plugin
2015-12-08 15:51:49 +01:00
ArthurHoaro
6a6f6c32e5 Fixes #403 : Remove QRCode in core CSS and fix plugin layout 2015-12-07 11:03:30 +01:00
nodiscc
8025c63906 [doc] add apache2 CSP config 2015-11-30 23:17:01 +01:00
nodiscc
a33c574461 remove obsolete doc 2015-11-30 22:43:28 +01:00
ArthurHoaro
90e5bd65c9 URL encode links when a redirector is set.
Fixes #328 - URL encode links when a redirector is set

  * WARNING - template edit - new variable available : "real_url"
  Contains the final real url (redirected or any other change on original URL)

  * Don't redirect shaares link in RSS/Atom.
  * Affects links shaared in description.
  * Move text2clickable and keepMultipleSpaces to Utils.php + unit test

UPDATE:

* keepMultipleSpaces renamed to space2nbsp
* space2nbsp improved to handle single space at line beginning
* links in text description aren't 'nofollow' anymore
2015-11-26 20:14:38 +01:00
ArthurHoaro
e4b9a7633d Bugfix: do not store plugin errors in data.php
Before this, calling writeConfig() would have write error messages in data.php, because it uses 'plugins' array which is used for plugin configuration.

Causing the message error appear everytime.
2015-11-22 14:45:09 +01:00
VirtualTam
a7921b2445 cleanup: remove the executable bit from source scripts
Signed-off-by: VirtualTam <virtualtam@flibidi.net>
2015-11-11 19:19:24 +01:00
ArthurHoaro
056107ab4e Handle errors raised by plugins in template. fixes #370 2015-11-08 13:22:44 +01:00
Arthur
89dfc37b0a Merge pull request #286 from ArthurHoaro/plugin-demo_plugin
PLUGIN demo_plugin
2015-11-08 12:54:02 +01:00
ArthurHoaro
786ddad91d PLUGIN demo_plugin
This plugin try to cover Shaarli's plugin API entirely.
Can be used by plugin developper to make their own.
2015-11-08 12:47:44 +01:00
Arthur
66017e2893 Merge pull request #281 from ArthurHoaro/plugin-wallabag
PLUGIN wallabag
2015-11-08 12:46:17 +01:00
Arthur
e760840fea Merge pull request #280 from ArthurHoaro/plugin-readityourself
PLUGIN readityourself
2015-11-08 12:45:19 +01:00
Arthur
00c25040c5 Merge pull request #279 from ArthurHoaro/plugin-addlink_toolbar
PLUGIN: addlink_toolbar
2015-11-08 12:45:07 +01:00
ArthurHoaro
1696f6aa07 unit tests for the wallabag plugin
+ removed exit error if the config is not found
+ coding style
2015-11-08 12:44:29 +01:00
ArthurHoaro
b11c8f25df unit tests for readityourself plugin + remove hard error 2015-11-08 12:42:29 +01:00
ArthurHoaro
ff5bda8238 unit test for addlink_toolbar + coding style 2015-11-08 12:40:14 +01:00
ArthurHoaro
1b2b44f4bd PLUGIN: addlink_toolbar
Add a field in linklist page to paste a new link.

Displayed in fields toolbar.
2015-11-08 12:20:20 +01:00
ArthurHoaro
75b69987b3 PLUGIN readityourself
Add an icon for each link (linklist) for ReadItYourself
2015-11-08 12:02:41 +01:00
Arthur
245432e796 Merge pull request #284 from ArthurHoaro/plugin-playvideos
PLUGIN playvideos
2015-11-07 16:53:07 +01:00
Arthur
c536c98ae1 Merge pull request #285 from ArthurHoaro/plugin-qrcode
PLUGIN QRCode
2015-11-07 16:52:53 +01:00
ArthurHoaro
263d1f6495 PLUGIN wallabag
Add a Wallabag icon in linklist for each link.
2015-11-07 16:45:20 +01:00
ArthurHoaro
9a364c283e Add unit test for archiveorg plugin
+ coding style
2015-11-07 16:40:25 +01:00
ArthurHoaro
b7b9dbb0d5 PLUGIN archiveorg
Display an archive.org icon in linklist, foreach links.
2015-11-07 16:40:25 +01:00
ArthurHoaro
840caea64f Add unit tests for Playvideos plugin
+ coding style
2015-11-07 16:30:56 +01:00
ArthurHoaro
b17c19ff76 PLUGIN playvideos
Display a button in buttons toolbar which allows to play all videos found.
2015-11-07 16:21:21 +01:00
ArthurHoaro
abb3ff38f5 Add unit tests for the QRCode plugin
+ coding style
2015-11-07 16:13:08 +01:00