Commit Graph

15 Commits

Author SHA1 Message Date
GitLab Bot 6c85cb2ff1 Add latest changes from gitlab-org/security/gitlab@14-10-stable-ee 2022-04-29 08:22:13 +00:00
GitLab Bot eba5214085 Add latest changes from gitlab-org/security/gitlab@14-2-stable-ee 2021-08-30 12:22:09 +00:00
GitLab Bot b76ae63846 Add latest changes from gitlab-org/gitlab@14-2-stable-ee 2021-08-19 09:08:42 +00:00
GitLab Bot 4555e1b21c Add latest changes from gitlab-org/gitlab@13-12-stable-ee 2021-05-19 15:44:42 +00:00
GitLab Bot 1d49348727 Add latest changes from gitlab-org/security/gitlab@13-10-stable-ee 2021-03-30 22:44:32 +00:00
GitLab Bot 48aff82709 Add latest changes from gitlab-org/gitlab@13-5-stable-ee 2020-10-21 07:08:36 +00:00
GitLab Bot 6e4e1050d9 Add latest changes from gitlab-org/gitlab@13-3-stable-ee 2020-08-20 18:42:06 +00:00
GitLab Bot ea4766228b Add latest changes from gitlab-org/gitlab@13-2-stable-ee 2020-08-05 18:10:10 +00:00
GitLab Bot 11e9b7b588 Add latest changes from gitlab-org/security/gitlab@13-1-stable-ee 2020-06-29 19:21:38 +00:00
GitLab Bot 9f46488805 Add latest changes from gitlab-org/gitlab@13-0-stable-ee 2020-05-20 14:34:42 +00:00
GitLab Bot 17ab40ca08 Add latest changes from gitlab-org/gitlab@master 2020-02-26 15:08:56 +00:00
GitLab Bot e06d0e7796 Add latest changes from gitlab-org/gitlab@master 2020-02-25 15:08:50 +00:00
Brett Walker ae862960b1 Bump the CACHE_COMMONMARK_VERSION
to ensure any markdown generated before the asset
proxy default was corrected is re-generated
2019-09-11 14:35:37 -05:00
Jan Provaznik a98b89e9bc Re-escape whole HTML content instead of only match
When we un-escape HTML text to find references in it, we should then
re-escape the whole text again, not only found matches.

Because we replace matches with milestone/label links (which contain
HTML tags we don't want to escape again), we re-escape HTML text
with placeholders instead of these links and then replace placeholders
in the escaped text.
2019-08-23 10:36:51 +02:00
Patrick Bajao 2eecfd8f9d Use Redis for CacheMarkDownField on non AR models
This allows using `CacheMarkdownField` for models that are not backed
by ActiveRecord.

When the including class inherits `ActiveRecord::Base` we include
`Gitlab::MarkdownCache::ActiveRecord::Extension`. This will cause the
markdown fields to be rendered and the generated HTML stored in a
`<field>_html` attribute on the record. We also store the version
used for generating the markdown.

All other classes that include this model will include the
`Gitlab::MarkdownCache::Redis::Extension`. This add the `<field>_html`
attributes to that model and will generate the html in them. The
generated HTML will be cached in redis under the key
`markdown_cache:<class>:<id>`. The class this included in must
therefore respond to `id`.
2019-06-05 13:19:59 +08:00