[Glitch] Surround mid-text display names with bdi tags

Port 7861c5f108 to glitch-soc
This commit is contained in:
Thibaut Girka 2018-10-22 18:52:59 +02:00
parent 323ae1403a
commit 0c7f710be1
3 changed files with 4 additions and 4 deletions

View file

@ -15,7 +15,7 @@ export default function DisplayName ({
// The result. // The result.
return account ? ( return account ? (
<span className={computedClass}> <span className={computedClass}>
<strong className='display-name__html' dangerouslySetInnerHTML={{ __html: account.get('display_name_html') }} /> <bdi><strong className='display-name__html' dangerouslySetInnerHTML={{ __html: account.get('display_name_html') }} /></bdi>
{inline ? ' ' : null} {inline ? ' ' : null}
<span className='display-name__account'>@{account.get('acct')}</span> <span className='display-name__account'>@{account.get('acct')}</span>
</span> </span>

View file

@ -34,7 +34,7 @@ export default class MovedNote extends ImmutablePureComponent {
<div className='account__moved-note'> <div className='account__moved-note'>
<div className='account__moved-note__message'> <div className='account__moved-note__message'>
<div className='account__moved-note__icon-wrapper'><i className='fa fa-fw fa-suitcase account__moved-note__icon' /></div> <div className='account__moved-note__icon-wrapper'><i className='fa fa-fw fa-suitcase account__moved-note__icon' /></div>
<FormattedMessage id='account.moved_to' defaultMessage='{name} has moved to:' values={{ name: <strong dangerouslySetInnerHTML={displayNameHtml} /> }} /> <FormattedMessage id='account.moved_to' defaultMessage='{name} has moved to:' values={{ name: <bdi><strong dangerouslySetInnerHTML={displayNameHtml} /></bdi> }} />
</div> </div>
<a href={to.get('url')} onClick={this.handleAccountClick} className='detailed-status__display-name'> <a href={to.get('url')} onClick={this.handleAccountClick} className='detailed-status__display-name'>

View file

@ -63,13 +63,13 @@ export default class NotificationFollow extends ImmutablePureComponent {
// Links to the display name. // Links to the display name.
const displayName = account.get('display_name_html') || account.get('username'); const displayName = account.get('display_name_html') || account.get('username');
const link = ( const link = (
<Permalink <bdi><Permalink
className='notification__display-name' className='notification__display-name'
href={account.get('url')} href={account.get('url')}
title={account.get('acct')} title={account.get('acct')}
to={`/accounts/${account.get('id')}`} to={`/accounts/${account.get('id')}`}
dangerouslySetInnerHTML={{ __html: displayName }} dangerouslySetInnerHTML={{ __html: displayName }}
/> /></bdi>
); );
// Renders. // Renders.