matthiasblaesing commented on code in PR #7128:
URL: https://github.com/apache/netbeans/pull/7128#discussion_r1532833160


##########
ide/git/src/org/netbeans/modules/git/ui/history/RevisionNode.java:
##########
@@ -78,31 +94,59 @@ public RevisionNode(RepositoryRevision.Event revision, 
SearchHistoryPanel master
         initProperties();
     }
 
-    RepositoryRevision getContainer() {
-        return container;
-    }
-
     RepositoryRevision.Event getEvent() {
         return event;
     }
 
+    @Override
+    public String getHtmlDisplayName() {
+        if (isCommitNode()) {
+            return "<b>"+getName()+"</b>";
+        } else {
+            String c = annotationColorForAction(event.getAction());
+            return c != null ? "<font color="+c+">"+getName()+"</font>" : 
getName();
+        }
+    }

Review Comment:
   I would be careful with such predictions:
   
   ```
   matthias@enterprise:~$ mkdir test
   matthias@enterprise:~$ cd test
   matthias@enterprise:~/test$ touch '<b>filename with (broken) <br>html 
styling'
   matthias@enterprise:~/test$ ls
   '<b>filename with (broken) <br>html styling'
   matthias@enterprise:~/test$
   ```
   
   Yes - this broken HTML, given the age of the HTML parser of swing and the 
codebases relying on established behavior, I suspect, that it will happily chew 
this. Given that html and the state of its parsers is a royal mess, I would 
never trust a html parser to reject anything (regrettably my last hope xhtml 
died more or less).
   
   Edit: I did not even try to do insane things like directly modifiying the 
git trees in memory.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists

Reply via email to