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

HTML escaping seems to be broken for SLIM #292

Closed
docbobo opened this issue Jul 24, 2013 · 2 comments
Closed

HTML escaping seems to be broken for SLIM #292

docbobo opened this issue Jul 24, 2013 · 2 comments

Comments

@docbobo
Copy link

docbobo commented Jul 24, 2013

I tried to give FitNesse a try for the first time yesterday, together with RestFixture. Unfortunately, the results are not rendered correctly because the RestFixture results seem to be HTML escaped twice - once on the RestFixture/SlimServer side and once on the Fitnesse side.

Using 'git bisect', it seems that the following commit is the culprit:

e65c631d08a137382509bb32612ba5cfa1fecb15 is the first bad commit
commit e65c631d08a137382509bb32612ba5cfa1fecb15
Author: Arjan Molenaar <gaphor@gmail.com>
Date:   Wed Jan 30 22:23:56 2013 +0100

    * Fixed HTML escaping in HTMLTable
    * Added back counters, needs more work
    * interface cleanup

:040000 040000 4348c9c0a7f816803c9c4c1e85dda017ddc79027 6076b5200c28e8001dd65566aedfdd6531c41bf9 M  src

I did read somewhere that SLIM response should be already HTML escaped but failed to find this quote again. Can anybody confirm whether the SLIM response should already be escaped or not? This would determine whether this needs to be fixed on the FitNesse side or on the RestFixture side.

Thanks

@amolenaar
Copy link
Collaborator

The escaping in SLiM used to be very inconsistent. With the latest version I tried to make it consistent. As a rule of thumb all text will be escaped by FitNesse, so characters like < and > will be rendered properly. Also it releases the fixture writer from doing all sorts of escaping. I am aware that this will do a double escape, in case the fixture also does escaping. This, however, seems better than doing no escaping at all (which can really mess up test output).

@amolenaar
Copy link
Collaborator

Duplicate of #274.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants