mirror of
https://github.com/discourse/discourse.git
synced 2025-03-09 14:34:35 +00:00
FIX: prevents &hellip from being displayed in title attribute
This commit is contained in:
parent
7232a6e5a9
commit
a45d8a69f9
@ -9,7 +9,7 @@ export default Ember.Component.extend({
|
|||||||
"tabindex",
|
"tabindex",
|
||||||
"ariaLabel:aria-label",
|
"ariaLabel:aria-label",
|
||||||
"ariaHasPopup:aria-haspopup",
|
"ariaHasPopup:aria-haspopup",
|
||||||
"title",
|
"sanitizedTitle:title",
|
||||||
"value:data-value",
|
"value:data-value",
|
||||||
"name:data-name",
|
"name:data-name",
|
||||||
],
|
],
|
||||||
@ -18,7 +18,7 @@ export default Ember.Component.extend({
|
|||||||
|
|
||||||
ariaHasPopup: true,
|
ariaHasPopup: true,
|
||||||
|
|
||||||
ariaLabel: Ember.computed.or("computedContent.ariaLabel", "title"),
|
ariaLabel: Ember.computed.or("computedContent.ariaLabel", "sanitizedTitle"),
|
||||||
|
|
||||||
@computed("computedContent.title", "name")
|
@computed("computedContent.title", "name")
|
||||||
title(computedContentTitle, name) {
|
title(computedContentTitle, name) {
|
||||||
@ -28,6 +28,13 @@ export default Ember.Component.extend({
|
|||||||
return null;
|
return null;
|
||||||
},
|
},
|
||||||
|
|
||||||
|
// this might need a more advanced solution
|
||||||
|
// but atm it's the only case we have to handle
|
||||||
|
@computed("title")
|
||||||
|
sanitizedTitle(title) {
|
||||||
|
return String(title).replace("…", "");
|
||||||
|
},
|
||||||
|
|
||||||
label: Ember.computed.or("computedContent.label", "title", "name"),
|
label: Ember.computed.or("computedContent.label", "title", "name"),
|
||||||
|
|
||||||
name: Ember.computed.alias("computedContent.name"),
|
name: Ember.computed.alias("computedContent.name"),
|
||||||
|
Loading…
x
Reference in New Issue
Block a user