aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/Wallabag/CoreBundle/Helper/ContentProxy.php
Commit message (Collapse)AuthorAgeFilesLines
* ContentProxy: replace ignoreUrl with new RuleBasedIgnoreOriginProcessorKevin Decherf2020-04-251-37/+4
| | | | Signed-off-by: Kevin Decherf <kevin@kdecherf.com>
* Update depsJeremy Benoist2019-11-121-10/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Also CS (because cs-fixer got an update) Package operations: 0 installs, 26 updates, 0 removals - Updating twig/twig (v2.12.1 => v2.12.2) - Updating symfony/symfony (v3.4.33 => v3.4.34) - Updating doctrine/event-manager (v1.0.0 => 1.1.0) - Updating doctrine/collections (v1.6.2 => 1.6.3) - Updating doctrine/cache (v1.8.1 => 1.9.0) - Updating doctrine/persistence (1.1.1 => 1.2.0) - Updating doctrine/inflector (v1.3.0 => 1.3.1) - Updating symfony/mime (v4.3.5 => v4.3.7) - Updating swiftmailer/swiftmailer (v6.2.1 => v6.2.3) - Updating symfony/swiftmailer-bundle (v3.3.0 => v3.3.1) - Updating doctrine/dbal (v2.9.2 => v2.9.3) - Updating doctrine/instantiator (1.2.0 => 1.3.0) - Updating j0k3r/graby-site-config (1.0.93 => 1.0.94) - Updating phpoption/phpoption (1.5.0 => 1.5.2) - Updating symfony/http-client-contracts (v1.1.7 => v1.1.8) - Updating symfony/http-client (v4.3.5 => v4.3.7) - Updating sensiolabs/security-checker (v6.0.2 => v6.0.3) - Updating paragonie/constant_time_encoding (v2.2.3 => v2.3.0) - Updating scheb/two-factor-bundle (v4.7.1 => v4.8.0) - Updating symfony/phpunit-bridge (v4.3.6 => v4.3.7) - Updating composer/xdebug-handler (1.3.3 => 1.4.0) - Updating friendsofphp/php-cs-fixer (v2.15.3 => v2.16.0) - Updating doctrine/data-fixtures (v1.3.2 => 1.3.3) - Updating nette/schema (v1.0.0 => v1.0.1) - Updating nikic/php-parser (v4.2.4 => v4.3.0) - Updating sentry/sentry (2.2.2 => 2.2.4)
* Use hash given url to avoid duplicateJeremy Benoist2019-05-291-1/+2
| | | | Using hashed url we can ensure an index on them to ensure it's fast.
* Added given_url in entry tableNicolas Lœuillet2019-05-291-0/+1
| | | | | | | | | | - Added index on entry table for given_url field - Fix tests: The previous `bit.ly` url redirected to doc.wallabag but that url doesn't exist in the fixtures. I used our own internal "redirector" to create a redirect to an url which exist in the fixtures. Also, updating current migration to use the new `WallabagMigration`.
* Fix tests after rebaseJeremy Benoist2019-05-281-2/+4
|
* Fix some testsJeremy Benoist2019-05-281-8/+11
|
* Fix because of some breaking changes of Graby 2.0adev2019-05-281-11/+9
|
* Set first picture as preview picturenicofrand2019-05-211-4/+16
|
* Enable no-referrer on img tags, enable strict-origin-when-cross-origin by ↵Kevin Decherf2019-05-101-0/+1
| | | | | | | | default Fixes #3889 Signed-off-by: Kevin Decherf <kevin@kdecherf.com>
* Fix PHP warningJeremy Benoist2019-03-181-7/+6
| | | | Looks like sometimes (usually from import) the `html` key isn’t available.
* phpcsKevin Decherf2018-10-241-1/+2
| | | | Signed-off-by: Kevin Decherf <kevin@kdecherf.com>
* updateOriginUrl: remove 'query string' case from ignore listKevin Decherf2018-10-241-2/+0
| | | | | | | Two urls with a different query string may refer to two different pages so keep them both. Signed-off-by: Kevin Decherf <kevin@kdecherf.com>
* updateOriginUrl: add comment blocks for the parse_url diff checkKevin Decherf2018-10-241-0/+23
| | | | Signed-off-by: Kevin Decherf <kevin@kdecherf.com>
* updateOriginUrl: rewrite some if, resolving feedbacks from PRKevin Decherf2018-10-241-32/+35
| | | | Signed-off-by: Kevin Decherf <kevin@kdecherf.com>
* ignoreOriginUrl: add initial support of ignore listsKevin Decherf2018-10-221-20/+59
| | | | | | | | | | | Add the ability to specify hosts and patterns lists to ignore the given entry url and replace it with the fetched content url without touching to origin_url. This initial support should be reworked in the following months to move the hardcoded ignore lists in the database. Signed-off-by: Kevin Decherf <kevin@kdecherf.com>
* updateOriginUrl: add behavior when diff is fragment and queryKevin Decherf2018-10-221-0/+1
| | | | Signed-off-by: Kevin Decherf <kevin@kdecherf.com>
* Refactor updateOriginUrl to include new behaviors behaviorsKevin Decherf2018-10-221-9/+45
| | | | | | | | - Leave origin_url unchanged if difference is an ending slash - Leave origin_url unchanged if difference is scheme - Ignore (noop) if difference is query string or fragment Signed-off-by: Kevin Decherf <kevin@kdecherf.com>
* ContentProxy: swap entry url to origin_url and set new url according to ↵Kevin Decherf2018-10-211-4/+11
| | | | | | | | graby content Closes #3529 Signed-off-by: Kevin Decherf <kevin@kdecherf.com>
* ContentProxy: fix a corner case when entry.url is empty in updateEntryKevin Decherf2018-10-211-0/+8
| | | | Signed-off-by: Kevin Decherf <kevin@kdecherf.com>
* Run php-cs-fixer for fixing coding standard issuesTobi8232018-09-231-41/+53
|
* Override the value of the given parameter ($title) with the (hopefully)Tobi8232018-09-211-2/+1
| | | | correct (to UTF-8) converted PDF title
* Add tests for logicTobi8232018-09-211-2/+2
| | | | Try to translate the title of a PDF from UTF-8 (then UTF-16BE, then WINDOWS-1252) to UTF-8
* Try to detect the character encoding in PDFs and try to translateTobi8232018-09-211-13/+33
| | | | the title from the PDF to UTF-8
* Remove type declaration for PHP 5 compatibilityTobi8232018-09-211-1/+1
|
* Bugfix: Sanitize the title of a saved webpage from invalid UTF-8 charactersTobi8232018-09-211-0/+23
|
* php-cs-fixerKevin Decherf2018-09-051-4/+4
| | | | Signed-off-by: Kevin Decherf <kevin@kdecherf.com>
* Fix empty title and domain_name when exception is thrown during fetchKevin Decherf2017-12-131-4/+33
| | | | | | | | | | Add a new helper to set a default title when it's empty: 1/ use basename part of entry's path, if any 2/ or use domain name Fixes #2053 Signed-off-by: Kevin Decherf <kevin@kdecherf.com>
* Define storeArticleHeaders false by defaultJeremy Benoist2017-11-211-1/+1
| | | | | Fix tests which must use `$storeArticleHeaders`. Fix CS
* Added internal setting to enable/disable headers storageNicolas Lœuillet2017-11-201-2/+4
|
* CSJeremy Benoist2017-10-091-1/+1
|
* Add a test for updatePublishedAtJeremy Benoist2017-07-241-3/+9
| | | | | | | To avoid error when a content is re-submitted and it previously add a published date. Also, fix the `testPostSameEntry`
* Fix updatePublishedAt on already parsed article's dateSimounet2017-07-241-1/+1
|
* CSJeremy Benoist2017-07-031-70/+70
|
* Fix validateAndSetPreviewPictureJeremy Benoist2017-07-031-4/+1
| | | | Which wasn't covered by a test!
* Fix PATCH methodJeremy Benoist2017-07-031-37/+52
| | | | | The PATCH method for the entry should only update what user sent to us and not the whole entry as it was before. Also, sending tags when patching an entry will now remove all current tags & assocatied new ones.
* Add a real configuration for CS-FixerJeremy Benoist2017-07-011-5/+5
|
* Fix empty language and preview picsThomas Citharel2017-06-121-2/+2
|
* Convert - to _ in languageJeremy Benoist2017-06-091-0/+4
| | | | Mostly to increase language supports
* Use Locale instead of LanguageJeremy Benoist2017-06-091-2/+2
|
* CSJeremy Benoist2017-06-081-1/+2
|
* Validate language & preview picture fieldsJeremy Benoist2017-06-081-11/+67
| | | | | Instead of saving the value of each field right into the content without any validation, it seems better to validate them. This might sounds obvious now we say that.
* Add ability to patch an entry with more fieldsJeremy Benoist2017-06-021-1/+1
| | | | | | | | | Like when we create an entry, we can now patch an entry with new fields: - content - language - preview_picture - published_at - authors
* No need to catch that ExceptionJeremy Benoist2017-06-011-9/+2
|
* Rewrote code & fix testsJeremy Benoist2017-06-011-46/+20
|
* CSJeremy Benoist2017-06-011-3/+3
|
* Fix testsJeremy Benoist2017-06-011-8/+19
|
* Add disableContentUpdate import optionJerome Charaoui2017-06-011-22/+54
| | | | | | This commit also decouples the "import" and "update" functions inside ContentProxy. If a content array is available, it must be passed to the new importEntry method.
* Avoid returning objects passed by reference.Jerome Charaoui2017-06-011-4/+0
| | | | | | Objects are always passed by reference, so it doesn't make sense to return an object which is passed by reference as it will always be the same object. This change makes the code a bit more readable.
* Forced date can now be a timestamp tooJeremy Benoist2017-05-311-1/+8
| | | | Add adding more tests for forced content
* Improve docsJeremy Benoist2017-05-311-3/+3
|