Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
25a8e82
Fix API docs generation (#33384)
nosolosw Jul 13, 2021
728dcd7
Docs: use markdown headings instead of links for API declarations (#3…
juanmaguitar Jul 14, 2021
6537d4e
Docs: Run Prettier after updating API in documentation (#33498)
gziolo Jul 19, 2021
98779bf
Use tabs instead of spaces in block transform doc example (#33549)
jblz Jul 20, 2021
c985f56
Fix metabox reordering (#30617).
ribaricplusplus Aug 30, 2021
404619f
Block editor: don't render layout and duotone styles in between block…
ellatrix Jul 13, 2021
bdaa7b6
Widgets: Allow HTML tags in description (#33814)
Aug 9, 2021
336aa2a
Editor: Set 'hide_empty' for the most used terms query (#33457)
Mamaduka Jul 16, 2021
d9c56de
Update widget editor help links to point to the new support article (…
talldan Jul 16, 2021
455de81
If select-all fires in .editor-post-title__input, end the process.. (…
torounit Jul 22, 2021
891de6a
Writing flow: select all: remove early return for post title (#33699)
ellatrix Jul 26, 2021
5180b56
Call onChangeSectionExpanded conditionally (#33618)
kevin940726 Jul 22, 2021
a122eb8
FontSizePicker: Use number values when the initial value is a number …
Mamaduka Jul 30, 2021
20eb111
Fix justification for button block when selected (#33739)
mkaz Aug 2, 2021
b4c5c94
Add error boundaries to widget screens (#33771)
talldan Aug 2, 2021
466c9e3
Fix insertion point in Widgets editors (#33802)
kevin940726 Aug 2, 2021
40fa01a
Default batch processor: Respect the batch endpoint's maxItems (#34280)
noisysocks Aug 25, 2021
d888f1c
Fix button block focus trap after a URL has been added (#34314)
talldan Aug 27, 2021
c388f23
Text for dropdown fields within legacy widgets in the Customizer is o…
anton-vlasenko Aug 19, 2021
95dc1fd
Fix ESLint errors reported
gziolo Sep 1, 2021
4cf5f60
Regenerate autogenerated docs
gziolo Sep 1, 2021
90ac898
Update the `INSERTER_SEARCH_SELECTOR` path.
desrosj Sep 1, 2021
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Widgets: Allow HTML tags in description (#33814)
* Widgets: Allow HTML tags in description

* Use `dangerouslySetInnerHTML`

Avoid `<div />` inside the `<p />` tag

* Describe by dangerouslySetInnerHTML is used

* Use safeHTML

* Update comment
  • Loading branch information
Petter Walbø Johnsgård authored and desrosj committed Aug 30, 2021
commit bdaa7b6c1d5dbb76da3842ffd95bc5c5fad950a2
1 change: 1 addition & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions packages/edit-widgets/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@
"@wordpress/core-data": "file:../core-data",
"@wordpress/data": "file:../data",
"@wordpress/data-controls": "file:../data-controls",
"@wordpress/dom": "file:../dom",
"@wordpress/element": "file:../element",
"@wordpress/hooks": "file:../hooks",
"@wordpress/i18n": "file:../i18n",
Expand Down
11 changes: 10 additions & 1 deletion packages/edit-widgets/src/components/sidebar/widget-areas.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import { BlockIcon } from '@wordpress/block-editor';
import { Button } from '@wordpress/components';
import { __ } from '@wordpress/i18n';
import { addQueryArgs } from '@wordpress/url';
import { safeHTML } from '@wordpress/dom';

/**
* Internal dependencies
Expand Down Expand Up @@ -47,7 +48,15 @@ export default function WidgetAreas( { selectedWidgetAreaId } ) {
<div className="edit-widgets-widget-areas__top-container">
<BlockIcon icon={ blockDefault } />
<div>
<p>{ description }</p>
<p
// Use `dangerouslySetInnerHTML` to keep backwards
// compatibility. Basic markup in the description is an
// established feature of WordPress.
// @see https://github.com/WordPress/gutenberg/issues/33106
dangerouslySetInnerHTML={ {
__html: safeHTML( description ),
} }
/>
{ widgetAreas?.length === 0 && (
<p>
{ __(
Expand Down