-
Notifications
You must be signed in to change notification settings - Fork 537
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support Markdown in Add-on Listing Fields #22956
base: master
Are you sure you want to change the base?
Conversation
There should probably be a more informative way to explain what syntax or Markdown is supported, possibly similar to how GitHub explains it via the 'Markdown is Supported' button by navigating to a dedicated page. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks promising. A few comments before testing.
<p class="syntax-support"> | ||
{# L10n: %s is a list of markdown syntax. #} | ||
<span class="tooltip" title="{% if title %}{{ title }}{% else %}{{ | ||
_('Allowed Markdown: %(allowed_markdown)s', allowed_markdown='links, abbr, bold, italics, blockquote, code, ol, ul') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
allowed_markdown should be in a constant somewhere. If these are in fact the only tags allowed then use that same constant in actual processing.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just since you pointed this out --
There should probably be a more informative way to explain what syntax or Markdown is supported, possibly similar to how GitHub explains it via the 'Markdown is Supported' button by navigating to a dedicated page.
I mentioned this to Andrew offhandedly as, especially with the extensions, it may not be obvious what Markdown syntax is allowed in what way, and he mentioned maybe making it a page on the extension workshop over the tooltip. What do you think?
Please add testing steps and I can verify the PR. |
Fixes: mozilla/addons#15145
Description
Replaces HTML syntax support with Markdown support in the
description
,developer_comments
,eula
, andprivacy_policy
fields ofAddon
. Existing HTML in those fields will remain functional until the field is edited. No new HTML will be functional.Only the markdown-equivalent of currently allowed HTML attributes are allowed.
abbr
uses the PHP Markdown Extra syntax.DevHub:
Frontend:
Testing
* Any user-inputted HTML saved at this point no longer works. Any markdown in the field is formatted in the frontend, and HTML is not.
Checklist
#ISSUENUM
at the top of your PR to an existing open issue in the mozilla/addons repository.