]> source.dussan.org Git - gitblit.git/commitdiff
Process bugtraq links in the ticket description and comments 78/78/1
authorJames Moger <james.moger@gitblit.com>
Thu, 15 May 2014 17:28:49 +0000 (13:28 -0400)
committerJames Moger <james.moger@gitblit.com>
Thu, 15 May 2014 17:28:49 +0000 (13:28 -0400)
releases.moxie
src/main/java/com/gitblit/wicket/pages/TicketPage.java

index 7c12f30bbd419f48715bace722fed24c053d747f..049a28268c12215e38865dee937755cebeecdc85 100644 (file)
@@ -22,6 +22,7 @@ r24: {
     - Move repository deletion functions to the edit repository page AND allow deletion to be disabled (pr-180, ticket-67)
     - Update the Korean translation (pr-184, ticket-69)
     - Overhaul the EmptyRepositoryPage (ticket-73)
+    - Process bugtraq links in the ticket description and comments (ticket-78)
     additions:
     - Add My Tickets page (issue-215, ticket-15)
     - Added CRUD functionality for Ticket Milestones (ticket-17)
index c066f24dd6153166b3960b6ffa4fb9b3806c20ed..c8ec2f8cad16bc33a2bd2578d9f91dc949e8490e 100644 (file)
@@ -278,7 +278,8 @@ public class TicketPage extends RepositoryPage {
                if (StringUtils.isEmpty(ticket.body)) {\r
                        desc = getString("gb.noDescriptionGiven");\r
                } else {\r
-                       desc = MarkdownUtils.transformGFM(app().settings(), ticket.body, ticket.repository);\r
+                       String bugtraq = bugtraqProcessor().processPlainCommitMessage(getRepository(), repositoryName, ticket.body);\r
+                       desc = MarkdownUtils.transformGFM(app().settings(), bugtraq, ticket.repository);\r
                }\r
                add(new Label("ticketDescription", desc).setEscapeModelStrings(false));\r
 \r
@@ -685,7 +686,8 @@ public class TicketPage extends RepositoryPage {
                                                /*\r
                                                 * COMMENT\r
                                                 */\r
-                                               String comment = MarkdownUtils.transformGFM(app().settings(), entry.comment.text, repositoryName);\r
+                                               String bugtraq = bugtraqProcessor().processPlainCommitMessage(getRepository(), repositoryName, entry.comment.text);\r
+                                               String comment = MarkdownUtils.transformGFM(app().settings(), bugtraq, repositoryName);\r
                                                Fragment frag = new Fragment("entry", "commentFragment", this);\r
                                                Label commentIcon = new Label("commentIcon");\r
                                                if (entry.comment.src == CommentSource.Email) {\r