about summary refs log tree commit diff
path: root/app/javascript/mastodon/components/status_content.js
diff options
context:
space:
mode:
authorbeatrix <beatrix.bitrot@gmail.com>2017-05-12 22:03:43 -0400
committerEugen Rochko <eugen@zeonfederated.com>2017-05-13 04:03:43 +0200
commit3dcb5fa28f13f597d49b5b442f61d12bc2be6152 (patch)
tree50d9b18404756964d7c368e6d79562be478a61f4 /app/javascript/mastodon/components/status_content.js
parent1d5dcfcd46b973791c4f19f1dd66f33f3498800a (diff)
Revert HTML CW changes (#3020)
* selectively Revert "Fix regressions from #2683 (#2970)"

This reverts commit 72698bc3b49925a2b2955f32e5a562c1eecd729b.

* Revert "Handle hashtags in spoiler_texts (partial fix for #699) (#2683)"

This reverts commit e2491680e696d2c285a798ec4c66b26d2748df66.
Diffstat (limited to 'app/javascript/mastodon/components/status_content.js')
-rw-r--r--app/javascript/mastodon/components/status_content.js11
1 files changed, 4 insertions, 7 deletions
diff --git a/app/javascript/mastodon/components/status_content.js b/app/javascript/mastodon/components/status_content.js
index f7d6b750f..c51f85d10 100644
--- a/app/javascript/mastodon/components/status_content.js
+++ b/app/javascript/mastodon/components/status_content.js
@@ -93,7 +93,7 @@ class StatusContent extends React.PureComponent {
     const { hidden } = this.state;
 
     const content = { __html: emojify(status.get('content')) };
-    const spoilerContent = { __html: emojify(status.get('spoiler_text', '')) };
+    const spoilerContent = { __html: emojify(escapeTextContentForBrowser(status.get('spoiler_text', ''))) };
     const directionStyle = { direction: 'ltr' };
 
     if (isRtl(status.get('content'))) {
@@ -116,19 +116,16 @@ class StatusContent extends React.PureComponent {
       }
 
       return (
-        <div
-          ref={this.setRef}
-          className='status__content'
-          onMouseDown={this.handleMouseDown}
-          onMouseUp={this.handleMouseUp}
-        >
+        <div className='status__content' ref={this.setRef} onMouseDown={this.handleMouseDown} onMouseUp={this.handleMouseUp}>
           <p style={{ marginBottom: hidden && status.get('mentions').size === 0 ? '0px' : '' }} >
             <span dangerouslySetInnerHTML={spoilerContent} /> <button tabIndex='0' className='status__content__spoiler-link' onClick={this.handleSpoilerClick}>{toggleText}</button>
+
           </p>
 
           {mentionsPlaceholder}
 
           <div style={{ display: hidden ? 'none' : 'block', ...directionStyle }} dangerouslySetInnerHTML={content} />
+
         </div>
       );
     } else if (this.props.onClick) {