AnswerHub now allows for revised handling of HTML within the WMD editor for posted content to render HTML as text only with the displayed tags. This functionality is enhanced in version 2.12 and later to include HTML within both the title and body fields. AnswerHub retains normal rendering of HTML in custom web panels, static pages and site notifications.
If the user types HTML code in any content type, the content previews and renders as plain text.
- Topic Descriptions
This feature is incompatible with Legacy 1.6.6 themes.
As the admin, you can configure the community to use the Markdown editor without stripping HTML tags. You can allow the community to use HTML with other editors or enable users to choose which editor they want to use, as shown in step 5 below.
You can use full HTML when working with custom web panels, site notifications, and static pages even if you set the community to only make use of the Markdown editor and set the editor to store and display HTML as text.
The end user can cut and paste or otherwise post HTML code in the editor and post the code as text with the HTML tags remaining visible. This allows you to ask questions about HTML, while other users can see the HTML as plain text and provide responses that also include HTML as plain text. You can edit your posted questions, comments, answers, ideas, articles and add or modify HTML code examples and re-save. You can continue to use markdown to format your postings.
When you enable this feature, the end user cannot use HTML tags to affect the formatting of their posts within the Markdown editor.
To enable Markdown Editor HTML sanitization, do the following:
First, you will need to log in to your instance of AnswerHub.
Navigate to your avatar and select Administration in the drop-down.
Navigate to Site > General > Settings.
Select WMD (Markdown/CommonMark) from the drop-down in the Default Editor Markup field.
Toggle the feature on/off by selecting/deselecting the box next to the Store and display HTML tag as plain text in Markdown Editor field.
Ensure you have selected WMD (Markdown/CommonMark) from the Default Editor Markup drop-down list. You must either set this as the system default or select Allow user selection to allow users to set their own preference.
If the Markdown editor does not display, navigate to Plugins > Manage Plugins and click on the Disabled Plugins tab. Locate markdown-support and click ENABLE.
Content created with Text and Froala (WYSIWYG) editors will continue to store and process HTML. Any content created with the Markdown editor before enabling this feature will continue to execute HTML tags used outside of code blocks, unless edited and re-saved. The system will prompt users to utilize the editor in which they originally created content. All HTML tag processing will respect sanitization settings.
Without this functionality enabled, the following displays:
When you enable this functionality, the following displays:
Updated over 2 years ago