mirror of
https://github.com/jenkinsci/jenkins.git
synced 2026-11-10 02:26:18 +00:00
[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:
1 parent
eb6ddf8c90
commit
f043975fc8
2 files changed
+10
-3
No files matched your search
@@ -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);
|
||||
|
||||
|
||||
Reference in new issue
Block a user