Robert Speicher
32e63ba7a1
Add `data-[type]-id` attribute to reference links
...
This is to let us redact them later in another filter.
2015-08-08 16:43:29 -04:00
Robert Speicher
4e22dcb6a3
Add spec to RelativeLinkFilter for Unicode filenames
2015-07-30 17:25:07 -04:00
Hiroyuki Sato
1cd2860065
Fix the image file that contains non-ascii character is not displayed
2015-07-27 16:18:12 +09:00
Dmitriy Zaporozhets
79aac2c128
Merge branch 'ignore-references' into 'master'
...
Don't notify users mentioned in code blocks or blockquotes.
cc @rspeicher
See merge request !753
2015-06-02 18:39:18 +00:00
Robert Speicher
9e7a9c63a5
Further limit the limited whitelist for project/group descriptions
2015-06-02 13:41:12 -04:00
Robert Speicher
023dd2907b
Add a `pipeline` context option for SanitizationFilter
...
When this option is `:description`, we use a more restrictive whitelist.
This is used for Project and Group description fields.
2015-06-02 13:04:10 -04:00
Douwe Maan
94919c7ef6
Ignore references in blockquotes.
2015-06-02 13:17:21 +02:00
Robert Speicher
7424d2fa5b
Add ExternalLinkFilter to Markdown pipeline
...
Forces a `rel="nofollow"` attribute on all external links.
2015-05-27 15:39:08 -04:00
Robert Speicher
5a9c5520d9
Make use of to_reference in more specs
2015-05-26 15:49:22 -04:00
Robert Speicher
81a09bc74c
Support only double quotes for multi-word label references
2015-05-26 15:49:20 -04:00
Robert Speicher
b88da58cb6
Add `reference_pattern` to Referable models
2015-05-26 15:48:32 -04:00
Robert Speicher
9d032cddf5
Correct the ReferenceFilter html/pipeline/filter require
2015-05-26 15:48:31 -04:00
Robert Speicher
b263a33c80
Better handle label references that aren't actually references
...
Fixes #1690
2015-05-25 16:06:34 -04:00
Robert Speicher
212fe14c65
Customize the sanitization whitelist only once
...
Fixes #1651
2015-05-20 21:16:11 -04:00
Robert Speicher
8ee382087d
Subclass TaskList::Filter to fix a bug
...
Instead of using a fork, we subclass the filter and only apply the
`task-list` class to list items that actually are task lists.
Closes #1645
See https://github.com/github/task_list/pull/60
2015-05-20 12:08:33 -04:00
Robert Speicher
7f2fb72a0a
Minor RelativeLinkFilter cleanup
2015-05-13 14:08:37 -04:00
Jakub Jirutka
b3276661f7
RelativeLinkFilter: refactor according to suggestions by @tsigo
2015-05-11 20:43:18 +02:00
Jakub Jirutka
f7adac87fe
Extract handling of relative file links to RelativeLinkFilter
2015-05-11 02:07:26 +02:00
Robert Speicher
70bbf093aa
Remove class and id attributes from SanitizationFilter whitelist
2015-05-08 12:31:34 -04:00
Robert Speicher
cca28c7920
Update Markdown help docs for latest changes
2015-05-06 21:04:33 -04:00
Robert Speicher
84a7675ea6
Remove title_for_issue helper
2015-04-30 17:27:33 -04:00
Robert Speicher
242bebc134
Remove special handling for the `'` problem
...
While `escape_once` will create this HTML entity, Nokogiri always
translates it back before it gets to IssueReferenceFilter, so there
should be no danger of erroneous issue links.
2015-04-30 16:35:27 -04:00
Robert Speicher
0027c2ddd7
Add Project#get_issue
2015-04-30 16:35:27 -04:00
Robert Speicher
466bec7caa
Rename SCHEME_PATTERN to LINK_PATTERN
2015-04-30 16:35:27 -04:00
Robert Speicher
cd3c24a8f3
Autolink short URLs
2015-04-30 16:35:27 -04:00
Robert Speicher
50f707e27a
Update Autolink SCHEME_PATTERN
2015-04-30 16:35:26 -04:00
Robert Speicher
e46d1cdd8b
Add Gitlab::Markdown::SanitizationFilter
...
This just extends the HTML::Pipeline::SanitizationFilter with our custom
whitelist.
2015-04-30 16:35:25 -04:00
Robert Speicher
aa2cc670fe
Add Gitlab::Markdown::AutolinkFilter
2015-04-30 16:35:25 -04:00
Robert Speicher
382a0aa6ef
Add Gitlab::Markdown::TableOfContentsFilter
...
Removes header and table of contents processing from Redcarpet renderer.
2015-04-30 16:35:25 -04:00
Robert Speicher
a64b5e3c60
Convert UserReferenceFilter#link_to_group to use a guard clause
2015-04-25 21:26:43 -04:00
Robert Speicher
92783eae2b
Refactor `UserReferenceFilter#user_link_filter`
2015-04-25 18:07:20 -04:00
Robert Speicher
9d3a1d0054
Fix docs for `push_result`
...
[ci skip]
2015-04-25 17:44:24 -04:00
Robert Speicher
07a88040a4
Fix NotificationService spec
2015-04-25 16:46:06 -04:00
Robert Speicher
95ca6584d8
Add CommitRange directly to results Hash
2015-04-25 14:46:06 -04:00
Robert Speicher
c0a97d70ef
Don't allow nil references to get added to results
2015-04-25 14:41:06 -04:00
Robert Speicher
6bac823ad4
Update CommitRangeReferenceFilter to use CommitRange class
...
Also matches CommitReferenceFilter's new behavior of always using short
SHAs in the link text.
2015-04-25 14:41:06 -04:00
Robert Speicher
2c8bfedb20
Always use short SHAs as commit reference link text
...
Now when a user pastes a full SHA like
`d7f61affaf845f44b4cc995e34eb1606c47c8eff`, its link text will only show
`d7f61aff` for brevity.
2015-04-25 14:40:40 -04:00
Robert Speicher
a6defd1576
Add results to reference filters
2015-04-25 14:39:45 -04:00
Robert Speicher
879be42862
Initialize the references result Hash in ReferenceFilter
2015-04-25 14:39:44 -04:00
Douwe Maan
8ed7ac9d44
Use project.commit convenience method.
2015-04-24 12:29:36 +02:00
Robert Speicher
a14d109b9b
Provide autoload paths for filters to prevent circular dependency
2015-04-23 12:58:55 -04:00
Robert Speicher
fb5116caa2
Use `search_text_nodes` helper in our custom filters
...
Closes #1477
2015-04-22 13:18:15 -04:00
Robert Speicher
4ced630fed
Add Gitlab::Markdown::EmojiFilter
2015-04-21 12:53:42 -04:00
Douwe Maan
c52bf4ad3c
Tweak single-word label regex to fix pending spec.
2015-04-20 13:01:47 -04:00
Douwe Maan
b5802d144b
project_from_ref returns nil when reference doesn't exist.
2015-04-20 13:01:47 -04:00
Robert Speicher
2823c058d8
project_from_ref returns nil when reference can't be accessed
...
Prior it would return the project from the current context, which wasn't
the intended behavior.
2015-04-20 13:01:47 -04:00
Robert Speicher
34f1dbb143
Better commit lookup for CommitRangeReferenceFilter
2015-04-20 13:01:46 -04:00
Robert Speicher
6853465acf
Remove extraneous IGNORE_PARENTS from filter
2015-04-20 13:01:46 -04:00
Robert Speicher
621687bfdf
Fix `user_can_reference_project?` check
2015-04-20 13:01:46 -04:00
Robert Speicher
b905702d4f
Escape title attributes in references
2015-04-20 13:01:46 -04:00