瀏覽代碼

Update StatusPipeline

Daniel Supernault 7 年之前
父節點
當前提交
1b794c8508
共有 2 個文件被更改,包括 2 次插入2 次删除
  1. 1 1
      app/Http/Controllers/CommentController.php
  2. 1 1
      app/Jobs/StatusPipeline/StatusEntityLexer.php

+ 1 - 1
app/Http/Controllers/CommentController.php

@@ -26,7 +26,7 @@ class CommentController extends Controller
       $reply = new Status();
       $reply->profile_id = $profile->id;
       $reply->caption = $comment;
-      $reply->rendered = $comment;
+      $reply->rendered = e($comment);
       $reply->in_reply_to_id = $status->id;
       $reply->in_reply_to_profile_id = $status->profile_id;
       $reply->save();

+ 1 - 1
app/Jobs/StatusPipeline/StatusEntityLexer.php

@@ -45,7 +45,7 @@ class StatusEntityLexer implements ShouldQueue
     public function parseHashtags()
     {
         $status = $this->status;
-        $text = $status->caption;
+        $text = e($status->caption);
         $tags = HashtagLexer::getHashtags($text);
         $rendered = $text;
         if(count($tags) > 0) {