Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

compareVersions responder content not HTML escaped #861

Closed
cedclement opened this issue Jan 19, 2016 · 3 comments
Closed

compareVersions responder content not HTML escaped #861

cedclement opened this issue Jan 19, 2016 · 3 comments
Milestone

Comments

@cedclement
Copy link

@cedclement cedclement commented Jan 19, 2016

Hello,
The compareVersions responder generates invalid HTML, because the pages content is not escaped.

@amolenaar
Copy link
Collaborator

@amolenaar amolenaar commented Jan 19, 2016

Hi,

Can you provide an example? That would really help in narrowing the issue.

@cedclement
Copy link
Author

@cedclement cedclement commented Jan 20, 2016

Yes sure !
For instance, if the content.txt contains a backward search reference link such as <AncestorPage.SomePage, then the diff is truncated before <AncestorPage.SomePage and the browser complains about a missing closing tag.
Looking at the generated html, I can see that the content is not HTML escaped :

<table class="diff_table">   
  <tr>
    <td class="diff_line diff_chunk_header">--- 71b8e94e0f142ecadd0e36f7cfd832d4b058ce49</td>
  </tr>
  <tr>
    <td class="diff_line diff_chunk_header">+++ 88b0eb625fa81a7d1158a588fb86a7b0cb003136</td>
  </tr>
  <tr>
    <td class="diff_line diff_chunk_header">@@ -1,2 +1,2 @@</td>
  </tr>
  <tr>
    <td class="diff_line">Some content</td>
  </tr>
  <tr>
    <td class="diff_line diff_line_removed">-Try a link to <AncestorPage.SomePage </td>
  </tr>
  <tr>
    <td class="diff_line diff_line_added">+Try a link to <AncestorPage.SomePage with more content </td>
  </tr>
</table>
@amolenaar amolenaar added this to the Next release milestone Feb 3, 2016
amolenaar added a commit that referenced this issue Feb 12, 2016
Fix for #861: compareVersions responder is not escaping output.
@amolenaar
Copy link
Collaborator

@amolenaar amolenaar commented Feb 15, 2016

Fixed by #869.

@amolenaar amolenaar closed this Feb 15, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants