James Moger
2013-05-15 bca8c5c52554b6aac65b8e2300675ae8f6af1d6d
Fix message escaping when combined with regex substitutions (issue-242)
3 files modified
7 ■■■■■ changed files
releases.moxie 1 ●●●● patch | view | raw | blame | history
src/main/java/com/gitblit/wicket/pages/CommitPage.html 2 ●●● patch | view | raw | blame | history
src/main/java/com/gitblit/wicket/pages/RepositoryPage.java 4 ●●●● patch | view | raw | blame | history
releases.moxie
@@ -26,6 +26,7 @@
     - Fixed extracting Groovy scripts on Express installs (issue 220)
     - Ensure Redmine url is properly formatted (issue 223)
     - Use standard ServletRequestWrapper instead of custom wrapper (issue 224)
     - Switch commit message back to a pre and ensure that it is properly escaped when combined with commit message regex substitution (issue 242)
    changes:
     - Improved error logging for servlet containers which provide a null contextFolder (issue 199)
src/main/java/com/gitblit/wicket/pages/CommitPage.html
@@ -49,7 +49,7 @@
    </div>
    
    <!-- full message -->
    <div class="commit_message" wicket:id="fullMessage">[commit message]</div>
    <pre class="commit_message" wicket:id="fullMessage">[commit message]</pre>
    <!--  git notes -->
    <table class="gitnotes">
src/main/java/com/gitblit/wicket/pages/RepositoryPage.java
@@ -431,9 +431,9 @@
    }
    protected void addFullText(String wicketId, String text, boolean substituteRegex) {
        String html = StringUtils.escapeForHtml(text, true);
        String html = StringUtils.escapeForHtml(text, false);
        if (substituteRegex) {
            html = GitBlit.self().processCommitMessage(repositoryName, text);
            html = GitBlit.self().processCommitMessage(repositoryName, html);
        } else {
            html = StringUtils.breakLinesForHtml(html);
        }