[HUDSON-5941] [HUDSON-5944] MarkupText.toString(boolean) was ignoring the

preEscape parameter when no markup tags were added.


git-svn-id: https://hudson.dev.java.net/svn/hudson/trunk/hudson/main@28737 71c3de6d-444a-0410-be80-ed276b4c234a
This commit is contained in:
mindless committed 2010-03-16 16:14:27 +00:00
1 parent eb6ddf8c90
commit f043975fc8
2 files changed
+10 -3

No files matched your search

+2 -2
View File
@@ -1,7 +1,7 @@
/*
* The MIT License
*
* Copyright (c) 2004-2009, Sun Microsystems, Inc., Kohsuke Kawaguchi
* Copyright (c) 2004-2010, Sun Microsystems, Inc., Kohsuke Kawaguchi
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
@@ -267,7 +267,7 @@ public class MarkupText extends AbstractMarkupText {
*/
public String toString(boolean preEscape) {
if(tags.isEmpty())
return Util.escape(text); // the most common case
return preEscape? Util.xmlEscape(text) : Util.escape(text); // the most common case
Collections.sort(tags);