Making WordPress.org

Changeset 1210


Ignore:
Timestamp:
02/02/2015 05:05:58 AM (10 years ago)
Author:
pento
Message:

Slack firehose: Encode ticket title, so that it doesn't cause the link in the Slack message to finish early

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sites/trunk/common/includes/slack/trac/comment-handler.php

    r1202 r1210  
    154154        $comment         = $this->format_comment_for_slack();
    155155        $main_attachment = $this->changes ? implode( "\n", $this->changes ) : $comment;
    156         $pretext         = sprintf( '*%s updated <%s|#%s %s>*', $this->author, $this->comment_url, $this->ticket_id, $this->title );
     156        $pretext         = sprintf( '*%s updated <%s|#%s %s>*', $this->author, $this->comment_url, $this->ticket_id, htmlspecialchars( $this->title, ENT_NOQUOTES ) );
    157157        $fallback        = trim( $pretext, '*' ) . "\n" . $main_attachment;
    158158
Note: See TracChangeset for help on using the changeset viewer.