提交 0449e79c 编写于 作者: N Nicolas De Loof

[FIXED JENKINS-18427] use MarkupFormater

上级 9108ab7a
......@@ -201,6 +201,10 @@ Upcoming changes</a>
<li class=bug>
Using proper directory separator character for permalinks on Windows.
(<a href="https://issues.jenkins-ci.org/browse/JENKINS-17681">issue 17681</a>)
<li class="bug">
Use markup formater to display parameter description.
(<a href="https://issues.jenkins-ci.org/browse/JENKINS-18427">issue 18427</a>)
</li>
</ul>
<h3><a name=v1.516>What's new in 1.516</a> (2013/05/27)</h3>
<ul class=image>
......
......@@ -137,6 +137,14 @@ public abstract class ParameterDefinition implements
return description;
}
public String getSafeDescription() {
try {
return Jenkins.getInstance().getMarkupFormatter().translate(description);
} catch (IOException e) {
return "failed to translate description using configured markup formatter";
}
}
/**
* {@inheritDoc}
*/
......
......@@ -26,8 +26,8 @@ THE SOFTWARE.
<j:jelly xmlns:j="jelly:core" xmlns:st="jelly:stapler" xmlns:d="jelly:define"
xmlns:l="/lib/layout" xmlns:t="/lib/hudson" xmlns:f="/lib/form"
xmlns:i="jelly:fmt" xmlns:p="/lib/hudson/project">
<f:entry title="${it.name}" description="${it.description}">
<div name="parameter" description="${it.description}">
<f:entry title="${it.name}" description="${it.safeDescription}">
<div name="parameter">
<input type="hidden" name="name" value="${it.name}" />
<f:textbox name="value" value="${it.defaultValue}" />
</div>
......
......@@ -1724,7 +1724,7 @@ function shortenName(name) {
// see http://wiki.jenkins-ci.org/display/JENKINS/Structured+Form+Submission
function buildFormTree(form) {
try {
// I initially tried to use an associative array with DOM elemnets as keys
// I initially tried to use an associative array with DOM elements as keys
// but that doesn't seem to work neither on IE nor Firefox.
// so I switch back to adding a dynamic property on DOM.
form.formDom = {}; // root object
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册