Fixed #4738 - Tooltip: escape should be false by default
parent
5ee9ac2d86
commit
95e8936be1
|
@ -47,8 +47,8 @@ export interface TooltipOptions {
|
|||
*/
|
||||
class?: string | undefined;
|
||||
/**
|
||||
* By default the tooltip contents are not rendered as text. Set to true to support html tags in the content.
|
||||
* @defaultValue false
|
||||
* By default the tooltip contents are not rendered as text. Set to false to support html tags in the content.
|
||||
* @defaultValue true
|
||||
*/
|
||||
escape?: boolean | undefined;
|
||||
/**
|
||||
|
|
|
@ -11,7 +11,7 @@ const Tooltip = BaseTooltip.extend('tooltip', {
|
|||
else if (typeof options.value === 'string') {
|
||||
target.$_ptooltipValue = options.value;
|
||||
target.$_ptooltipDisabled = false;
|
||||
target.$_ptooltipEscape = false;
|
||||
target.$_ptooltipEscape = true;
|
||||
target.$_ptooltipClass = null;
|
||||
target.$_ptooltipFitContent = true;
|
||||
target.$_ptooltipIdAttr = UniqueComponentId() + '_tooltip';
|
||||
|
@ -23,7 +23,7 @@ const Tooltip = BaseTooltip.extend('tooltip', {
|
|||
else {
|
||||
target.$_ptooltipValue = options.value.value;
|
||||
target.$_ptooltipDisabled = !!options.value.disabled === options.value.disabled ? options.value.disabled : false;
|
||||
target.$_ptooltipEscape = !!options.value.escape === options.value.escape ? options.value.escape : false;
|
||||
target.$_ptooltipEscape = !!options.value.escape === options.value.escape ? options.value.escape : true;
|
||||
target.$_ptooltipClass = options.value.class || '';
|
||||
target.$_ptooltipFitContent = !!options.value.fitContent === options.value.fitContent ? options.value.fitContent : true;
|
||||
target.$_ptooltipIdAttr = options.value.id || UniqueComponentId() + '_tooltip';
|
||||
|
@ -52,7 +52,7 @@ const Tooltip = BaseTooltip.extend('tooltip', {
|
|||
if (typeof options.value === 'string') {
|
||||
target.$_ptooltipValue = options.value;
|
||||
target.$_ptooltipDisabled = false;
|
||||
target.$_ptooltipEscape = false;
|
||||
target.$_ptooltipEscape = true;
|
||||
target.$_ptooltipClass = null;
|
||||
target.$_ptooltipIdAttr = target.$_ptooltipIdAttr || UniqueComponentId() + '_tooltip';
|
||||
target.$_ptooltipShowDelay = 0;
|
||||
|
@ -68,7 +68,7 @@ const Tooltip = BaseTooltip.extend('tooltip', {
|
|||
} else {
|
||||
target.$_ptooltipValue = options.value.value;
|
||||
target.$_ptooltipDisabled = !!options.value.disabled === options.value.disabled ? options.value.disabled : false;
|
||||
target.$_ptooltipEscape = !!options.value.escape === options.value.escape ? options.value.escape : false;
|
||||
target.$_ptooltipEscape = !!options.value.escape === options.value.escape ? options.value.escape : true;
|
||||
target.$_ptooltipClass = options.value.class || '';
|
||||
target.$_ptooltipFitContent = !!options.value.fitContent === options.value.fitContent ? options.value.fitContent : true;
|
||||
target.$_ptooltipIdAttr = options.value.id || target.$_ptooltipIdAttr || UniqueComponentId() + '_tooltip';
|
||||
|
@ -267,7 +267,7 @@ const Tooltip = BaseTooltip.extend('tooltip', {
|
|||
})
|
||||
});
|
||||
|
||||
if (el.$_ptooltipEscape) {
|
||||
if (!el.$_ptooltipEscape) {
|
||||
tooltipText.innerHTML = el.$_ptooltipValue;
|
||||
} else {
|
||||
tooltipText.innerHTML = '';
|
||||
|
|
Loading…
Reference in New Issue