Commit Graph

20 Commits

Author SHA1 Message Date
Vinoth Kannan f92a6f7ac5 FIX: 'local_cdn_url' method should work for local relative urls too. 2019-10-14 11:39:16 +05:30
Sam Saffron 30990006a9 DEV: enable frozen string literal on all files
This reduces chances of errors where consumers of strings mutate inputs
and reduces memory usage of the app.

Test suite passes now, but there may be some stuff left, so we will run
a few sites on a branch prior to merging
2019-05-13 09:31:32 +08:00
Jeff Wong 2863abefdd FIX: detect local assets for subfolder installs 2019-04-13 10:35:23 -07:00
Régis Hanol 664e90bd17 FIX: ensure local images use local CDN when uploads are stored on S3
When the S3 store was enabled, we were only applying the S3 CDN.
So all images stored locally, like the emojis, were never put on the local CDN.

Fixed a bunch of CookedPostProcessor test by adding a call to 'optimize_urls'
in order to get final URLs.

I also removed the unnecessary PrettyText.add_s3_cdn method since this is already
handled in the CookedPostProcessor.
2019-02-20 19:24:38 +01:00
Sam 671469bcc7 FIX: URLs containing two # would fail to work
Some URLs in browsers are non compliant and contain twos `#` this commit adds
special handling for this edge case by auto encoding any fragments containing `#`
2018-12-11 18:03:13 +11:00
Guo Xiang Tan e1b16e445e Rename `FileHelper.is_image?` -> `FileHelper.is_supported_image?`. 2018-09-12 09:22:28 +08:00
Régis Hanol de92913bf4 FIX: store the topic links using the cooked upload url 2018-08-14 12:23:32 +02:00
Gerhard Schlager e30851e45a Move escape_uri method to a more suitable place 2017-12-12 20:17:46 +01:00
Sam 59640bae3b FIX: absolute URL for CDN should always be rooted with a protocol 2016-09-05 15:57:46 +10:00
Régis Hanol caa1aea995 FIX: ensure emojis have absolute URLs and uses CDN 2016-07-15 18:37:51 +02:00
Régis Hanol 5169bcdb6e FIX: httpshttps ultra secure URLs 2016-06-30 16:55:01 +02:00
Sam 7a5a195dc0 FIX: properly support HTTPS CDN on HTTP site
Previously we changed all CDN links to schemaless.

This is desirable for non HTTPS sites, to ease migration to HTTPS.
It is not desirable for secure sites.

Once site is secure or CDN is secure a rebake should be required
to move it back to non-secure.
2015-07-24 14:08:32 +10:00
Régis Hanol 189cb3ff12 FEATURE: move migrate_to_new_scheme into a background job
- new hidden site setting 'migrate_to_new_scheme' (defaults to false)
- new rake tasks to toggle migration to new scheme
- FIX: migrate_to_new_scheme also works with CDN
- PERF: improve perf of the DbHelper.remap method
- REFACTOR: UrlHelper is now a class
2015-06-12 12:07:57 +02:00
Régis Hanol 20c9a312c7 FIX: clicks counter on attachments wasn't always working 2015-02-22 20:47:18 +01:00
Régis Hanol de76b512c1 fix most deprecations in the specs (still some left) 2014-09-25 17:44:48 +02:00
Régis Hanol c7330ed73f BUGFIX: errors when post-processing 'data images' 2014-07-18 17:54:18 +02:00
Régis Hanol b024bebbe2 BUGFIX: emoji's url were relatives (was breaking the wordpress plugin) 2014-01-14 23:51:36 +01:00
Régis Hanol 2ce75a8523 FIX: canonical url should not use the CDN 2013-12-17 00:35:34 +01:00
Régis Hanol 418856a789 make sure assets always use schemaless absolute uris 2013-12-06 11:16:13 +01:00
Régis Hanol 31fd5b85bc FIX markdown hotlinked images were not properly pulled 2013-11-20 13:10:08 +01:00