| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
| |
There wasn't really a reason to have them as a constant, and we were
getting "already defined" warnings which are always annoying.
|
| |
|
|
|
|
|
| |
This module is now the sole source of knowledge for *how* we render
Markdown (and GFM).
|
|
|
|
| |
It was redundant because `gfm` also took options.
|
|
|
|
| |
The patches reduces pressure on GC and reduces markdown processing time
|
|
|
|
|
| |
When this option is `:description`, we use a more restrictive whitelist.
This is used for Project and Group description fields.
|
|
|
|
| |
Forces a `rel="nofollow"` attribute on all external links.
|
|
|
|
|
|
|
|
|
| |
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
|
|\
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Fix reference links in dashboard activity and ATOM feeds.
References like `@user` were not linked on the dashboard activity feed and in Atom feeds, because the reference parser depends on `@project` which isn't set in those situations.
This MR passes the project in question to the reference parsers in an option.
cc @rspeicher
See merge request !653
|
| | |
|
|/ |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
| |
This just extends the HTML::Pipeline::SanitizationFilter with our custom
whitelist.
|
| |
|
|
|
|
| |
Removes header and table of contents processing from Redcarpet renderer.
|
| |
|
|
|
|
| |
Removes emoji-centric tests from GFM specs :boom:
|
| |
|
| |
|
|
|
|
|
| |
Commit ranges, commits, external issues, issues, labels, merge requests,
snippets, users.
|
|\
| |
| |
| |
| |
| |
| |
| | |
Parse GFM references after sanitizing
Parse GFM references - labels, issues, MRs, etc. - after calling the HTML Pipeline `SanitizationFilter` so that we can use non-whitelisted attributes like `style`. See #2188.
See merge request !1745
|
| |
| |
| |
| | |
Extract and re-insert links after sanitizing user markup.
|
| |
| |
| |
| |
| |
| | |
Parse GFM references - labels, issues, MRs, etc. - after calling the
HTML Pipeline `SanitizationFilter` so that we can use non-whitelisted
attributes like `style`.
|
|\ \
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Only allow users to reference groups, projects, issues, MRs, commits they have access to.
Addresses https://dev.gitlab.org/gitlab/gitlabhq/issues/2183.
See merge request !1742
|
| | | |
|
| | | |
|
| | | |
|
|\ \ \
| |/ /
|/| |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Don't allow username to end in period.
The current behavior doesn't do username referencing and mentioning in sentences like "I discussed with with @douwe." since `douwe.` is matched as a username.
Addresses private issue https://dev.gitlab.org/gitlab/gitlabhq/issues/2174.
See merge request !438
|
| |/ |
|
|\ \
| | |
| | |
| | |
| | | |
Conflicts:
lib/gitlab/markdown.rb
|
| |\ \
| | |/
| |/|
| | |
| | |
| | | |
Don't leak private group existence by redirecting from namespace controller to group controller.
See merge request !440
|
| | |
| | |
| | |
| | | |
to group controller.
|
|/ / |
|
|\ \ |
|
| |/
| |
| |
| |
| | |
When nesting task list items, the parent item is wrapped in a `<p>` tag.
Update the task list parser to handle these paragraph wrappers.
|
| |
| |
| |
| |
| |
| |
| |
| | |
Return a `SafeBuffer` instead of a `String` from the `#gfm_with_options`
method so that Rails doesn't escape our markup.
Also add `<span>` to the sanitization whitelist to avoid breaking syntax
highlighting in code blocks.
|
| | |
|
| |
| |
| |
| |
| | |
Use the `SanitizationFilter` class from the html-pipeline gem for inline
HTML instead of calling the Rails `sanitize` method.
|
|\ \
| |/
| |
| | |
Use the latest HTML pipeline gem
|
| |\
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Fix invalid Atom feeds when using emoji, horizontal rules, or images
This is a fix for issues #880, #723, #1113.
Markdown must be rendered to XHTML, not HTML, when generating summary content for Atom feeds. Otherwise, content-less tags like *img* and *hr* are not terminated and make the Atom XML invalid. Such tags are generated when issue descriptions, merge request descriptions, comments, or commit messages use emoji, horizontal rules, or images.
To pass this option through from the relevant Haml templates to the proper place in the `gfm()` method, a new method `gfm_with_options()` is introduced. It reuses the options dictionary passed to `markdown()` and interprets options `xhtml` and `parse_tasks` from it (the latter was a convenient replacement for `gfm_with_tasks()`). `xhtml` is already interpreted by Redcarpet::Render::HTML, but that alone was not sufficient, because the post-processing in `gfm()` would convert its XHTML tags back to HTML.
I found no way of passing additional optional options to the existing `gfm()` method without requiring updates to existing callers and without getting in the way of the existing optional arguments, but maybe someone who knows more about Ruby than I can think of one.
Thorough review appreciated since this is the first time I have used Ruby.
See merge request !344
|
| | |
| | |
| | |
| | | |
Fixes issues #880, #723, #1113: Markdown must be rendered to XHTML, not HTML, when generating summary content for Atom feeds. Otherwise, content-less tags like <img> and <hr>, generated when issue descriptions, merge request descriptions, comments, or commit messages use emoji, horizontal rules, or images, are not terminated and make the Atom XML invalid.
|
| | | |
|
| | | |
|
| | |
| | |
| | |
| | | |
This is what’s actually allowed when creating a user or a project in gitlab.
|
| |/
| |
| |
| |
| |
| | |
Make the following changes to deal with new behavior in Rails 4.1.2:
* Use nested resources to avoid slashes in arguments to path helpers.
|
| | |
|