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

ErbRenderer should always return HTML-safe string for option labels #2112

Conversation

floehopper
Copy link
Contributor

The option label text is all provided by developers; none of it is supplied by external users. This means we can legitimately mark all option label text as HTML-safe. c.f. #2098

There's no need to update any regression test artefacts, because this change only affects the options in question pages and these are all currently rendered by the I18nRenderer.

This is unrelated to the other changes in this PR, but I thought I'd take the
opportunity to fix it anyway.
The option label text is all provided by developers; none of it is supplied by
external users. This means we can legitimately mark all option label text as
HTML-safe.

c.f. a5abd6c
@chrisroos
Copy link
Contributor

Looks good to me.

@chrisroos chrisroos added the LGTM label Nov 18, 2015
floehopper added a commit that referenced this pull request Nov 18, 2015
…urn-html-safe-string-for-option-labels

ErbRenderer should always return HTML-safe string for option labels
@floehopper floehopper merged commit e7c254f into master Nov 18, 2015
@floehopper floehopper deleted the erb-renderer-should-always-return-html-safe-string-for-option-labels branch November 18, 2015 12:26
floehopper added a commit that referenced this pull request Nov 18, 2015
Since #2098 & #2112, apostrophes rendered via `SmartAnswer::ErbRenderer` have
not been HTML-escaped. Now that we are rendering question content via this
renderer, we need to update the regression test artefacts for question pages
accordingly.

I ran the following commands to do this:

    $ find test/artefacts/benefit-cap-calculator -name '*.html' | xargs sed -i .bak "s/'/'/g"
    $ git clean -fd test/artefacts/benefit-cap-calculator/**/*.bak
floehopper added a commit that referenced this pull request Nov 18, 2015
Since #2098 & #2112, apostrophes rendered via `SmartAnswer::ErbRenderer` have
not been HTML-escaped. Now that we are rendering question content via this
renderer, we need to update the regression test artefacts for question pages
accordingly.

I ran the following commands to do this:

    $ find test/artefacts/am-i-getting-minimum-wage -name '*.html' | xargs sed -i .bak "s/'/'/g"
    $ git clean -fd test/artefacts/am-i-getting-minimum-wage/**/*.bak
floehopper added a commit that referenced this pull request Nov 18, 2015
Since #2098 & #2112, apostrophes rendered via `SmartAnswer::ErbRenderer` have
not been HTML-escaped. Now that we are rendering question content via this
renderer, we need to update the regression test artefacts for question pages
accordingly.

I ran the following commands to do this:

    $ find test/artefacts/benefit-cap-calculator -name '*.html' | xargs sed -i .bak "s/'/'/g"
    $ git clean -fd test/artefacts/benefit-cap-calculator/**/*.bak
floehopper added a commit that referenced this pull request Nov 18, 2015
Since #2098 & #2112, apostrophes rendered via `SmartAnswer::ErbRenderer` have
not been HTML-escaped. Now that we are rendering question content via this
renderer, we need to update the regression test artefacts for question pages
accordingly.

I ran the following commands to do this:

    $ find test/artefacts/calculate-married-couples-allowance -name '*.html' | xargs sed -i .bak "s/'/'/g"
    $ git clean -fd test/artefacts/calculate-married-couples-allowance/**/*.bak
floehopper added a commit that referenced this pull request Nov 18, 2015
Since #2098 & #2112, apostrophes rendered via `SmartAnswer::ErbRenderer` have
not been HTML-escaped. Now that we are rendering question content via this
renderer, we need to update the regression test artefacts for question pages
accordingly.

I ran the following commands to do this:

    $ find test/artefacts/calculate-your-child-maintenance -name '*.html' | xargs sed -i .bak "s/'/'/g"
    $ git clean -fd test/artefacts/calculate-your-child-maintenance/**/*.bak
floehopper added a commit that referenced this pull request Nov 18, 2015
Since #2098 & #2112, apostrophes rendered via `SmartAnswer::ErbRenderer` have
not been HTML-escaped. Now that we are rendering question content via this
renderer, we need to update the regression test artefacts for question pages
accordingly.

I ran the following commands to do this:

    $ find test/artefacts/benefit-cap-calculator -name '*.html' | xargs sed -i .bak "s/'/'/g"
    $ git clean -fd test/artefacts/benefit-cap-calculator/**/*.bak
floehopper added a commit that referenced this pull request Nov 18, 2015
Since #2098 & #2112, apostrophes rendered via `SmartAnswer::ErbRenderer` have
not been HTML-escaped. Now that we are rendering question content via this
renderer, we need to update the regression test artefacts for question pages
accordingly.

I ran the following commands to do this:

    $ find test/artefacts/am-i-getting-minimum-wage -name '*.html' | xargs sed -i .bak "s/'/'/g"
    $ git clean -fd test/artefacts/am-i-getting-minimum-wage/**/*.bak
floehopper added a commit that referenced this pull request Nov 18, 2015
Since #2098 & #2112, apostrophes rendered via `SmartAnswer::ErbRenderer` have
not been HTML-escaped. Now that we are rendering question content via this
renderer, we need to update the regression test artefacts for question pages
accordingly.

I ran the following commands to do this:

    $ find test/artefacts/calculate-married-couples-allowance -name '*.html' | xargs sed -i .bak "s/'/'/g"
    $ git clean -fd test/artefacts/calculate-married-couples-allowance/**/*.bak
floehopper added a commit that referenced this pull request Nov 18, 2015
Since #2098 & #2112, apostrophes rendered via `SmartAnswer::ErbRenderer` have
not been HTML-escaped. Now that we are rendering question content via this
renderer, we need to update the regression test artefacts for question pages
accordingly.

I ran the following commands to do this:

    $ find test/artefacts/calculate-your-holiday-entitlement -name '*.html' | xargs sed -i .bak "s/'/'/g"
    $ git clean -fd test/artefacts/calculate-your-holiday-entitlement/**/*.bak
floehopper added a commit that referenced this pull request Nov 18, 2015
Since #2098 & #2112, apostrophes rendered via `SmartAnswer::ErbRenderer` have
not been HTML-escaped. Now that we are rendering question content via this
renderer, we need to update the regression test artefacts for question pages
accordingly.

I ran the following commands to do this:

    $ find test/artefacts/check-uk-visa -name '*.html' | xargs sed -i .bak "s/'/'/g"
    $ git clean -fd test/artefacts/check-uk-visa/**/*.bak
floehopper added a commit that referenced this pull request Nov 18, 2015
Since #2098 & #2112, apostrophes rendered via `SmartAnswer::ErbRenderer` have
not been HTML-escaped. Now that we are rendering question content via this
renderer, we need to update the regression test artefacts for question pages
accordingly.

I ran the following commands to do this:

    $ find test/artefacts/childcare-costs-for-tax-credits -name '*.html' | xargs sed -i .bak "s/'/'/g"
    $ git clean -fd test/artefacts/childcare-costs-for-tax-credits/**/*.bak
floehopper added a commit that referenced this pull request Nov 18, 2015
Since #2098 & #2112, apostrophes rendered via `SmartAnswer::ErbRenderer` have
not been HTML-escaped. Now that we are rendering question content via this
renderer, we need to update the regression test artefacts for question pages
accordingly.

I ran the following commands to do this:

    $ find test/artefacts/estimate-self-assessment-penalties -name '*.html' | xargs sed -i .bak "s/&/\&/g"
    $ git clean -fd test/artefacts/**/*.bak
floehopper added a commit that referenced this pull request Nov 18, 2015
Since #2098 & #2112, apostrophes rendered via `SmartAnswer::ErbRenderer` have
not been HTML-escaped. Now that we are rendering question content via this
renderer, we need to update the regression test artefacts for question pages
accordingly.

I ran the following commands to do this:

    $ find test/artefacts/inherits-someone-dies-without-will -name '*.html' | xargs sed -i .bak "s/'/'/g"
    $ git clean -fd test/artefacts/inherits-someone-dies-without-will/**/*.bak
floehopper added a commit that referenced this pull request Nov 18, 2015
Since #2098 & #2112, apostrophes rendered via `SmartAnswer::ErbRenderer` have
not been HTML-escaped. Now that we are rendering question content via this
renderer, we need to update the regression test artefacts for question pages
accordingly.

I ran the following commands to do this:

    $ find test/artefacts/inherits-someone-dies-without-will -name '*.html' | xargs sed -i .bak "s/'/'/g"
    $ git clean -fd test/artefacts/inherits-someone-dies-without-will/**/*.bak
floehopper added a commit that referenced this pull request Nov 19, 2015
Since #2098 & #2112, ampersands rendered via `SmartAnswer::ErbRenderer` have
not been HTML-escaped. Now that we are rendering question content via this
renderer, we need to update the content in the ERB template to use the HTML
entity for ampersand.
floehopper added a commit that referenced this pull request Nov 19, 2015
Since #2098 & #2112, apostrophes rendered via `SmartAnswer::ErbRenderer` have
not been HTML-escaped. Now that we are rendering question content via this
renderer, we need to update the regression test artefacts for question pages
accordingly.

I ran the following commands to do this:

    $ find test/artefacts/pip-checker -name '*.html' -print0 | xargs -0 sed -i .bak "s/'/'/g"
    $ git clean -fd test/artefacts/pip-checker/**/*.bak
floehopper added a commit that referenced this pull request Nov 19, 2015
Since #2098 & #2112, apostrophes rendered via `SmartAnswer::ErbRenderer` have
not been HTML-escaped. Now that we are rendering question content via this
renderer, we need to update the regression test artefacts for question pages
accordingly.

I ran the following commands to do this:

    $ find test/artefacts/plan-adoption-leave -name '*.html' -print0 | xargs -0 sed -i .bak "s/'/'/g"
    $ git clean -fd test/artefacts/plan-adoption-leave/**/*.bak
floehopper added a commit that referenced this pull request Nov 19, 2015
Since #2098 & #2112, apostrophes rendered via `SmartAnswer::ErbRenderer` have
not been HTML-escaped. Now that we are rendering question content via this
renderer, we need to update the regression test artefacts for question pages
accordingly.

I ran the following commands to do this:

    $ find test/artefacts/simplified-expenses-checker -name '*.html' -print0 | xargs -0 sed -i .bak "s/'/'/g"
    $ git clean -fd test/artefacts/simplified-expenses-checker/**/*.bak
floehopper added a commit that referenced this pull request Nov 19, 2015
Since #2098 & #2112, ampersands rendered via `SmartAnswer::ErbRenderer` have
not been HTML-escaped. Now that we are rendering question content via this
renderer, we need to update the content in the ERB template to use the HTML
entity for ampersand.
floehopper added a commit that referenced this pull request Nov 19, 2015
Since #2098 & #2112, apostrophes rendered via `SmartAnswer::ErbRenderer` have
not been HTML-escaped. Now that we are rendering question content via this
renderer, we need to update the regression test artefacts for question pages
accordingly.

I ran the following commands to do this:

    $ find test/artefacts/student-finance-calculator -name '*.html' -print0 | xargs -0 sed -i .bak "s/'/'/g"
    $ git clean -fd test/artefacts/student-finance-calculator/**/*.bak
floehopper added a commit that referenced this pull request Nov 19, 2015
Since #2098 & #2112, apostrophes rendered via `SmartAnswer::ErbRenderer` have
not been HTML-escaped. Now that we are rendering question content via this
renderer, we need to update the regression test artefacts for question pages
accordingly.

I ran the following commands to do this:

    $ find test/artefacts/calculate-your-child-maintenance -name '*.html' | xargs sed -i .bak "s/'/'/g"
    $ git clean -fd test/artefacts/calculate-your-child-maintenance/**/*.bak
floehopper added a commit that referenced this pull request Nov 19, 2015
Since #2098 & #2112, apostrophes rendered via `SmartAnswer::ErbRenderer` have
not been HTML-escaped. Now that we are rendering question content via this
renderer, we need to update the regression test artefacts for question pages
accordingly.

I ran the following commands to do this:

    $ find test/artefacts/calculate-your-holiday-entitlement -name '*.html' | xargs sed -i .bak "s/'/'/g"
    $ git clean -fd test/artefacts/calculate-your-holiday-entitlement/**/*.bak
floehopper added a commit that referenced this pull request Nov 19, 2015
Since #2098 & #2112, apostrophes rendered via `SmartAnswer::ErbRenderer` have
not been HTML-escaped. Now that we are rendering question content via this
renderer, we need to update the regression test artefacts for question pages
accordingly.

I ran the following commands to do this:

    $ find test/artefacts/check-uk-visa -name '*.html' | xargs sed -i .bak "s/'/'/g"
    $ git clean -fd test/artefacts/check-uk-visa/**/*.bak
floehopper added a commit that referenced this pull request Nov 19, 2015
Since #2098 & #2112, apostrophes rendered via `SmartAnswer::ErbRenderer` have
not been HTML-escaped. Now that we are rendering question content via this
renderer, we need to update the regression test artefacts for question pages
accordingly.

I ran the following commands to do this:

    $ find test/artefacts/childcare-costs-for-tax-credits -name '*.html' | xargs sed -i .bak "s/'/'/g"
    $ git clean -fd test/artefacts/childcare-costs-for-tax-credits/**/*.bak
floehopper added a commit that referenced this pull request Nov 19, 2015
Since #2098 & #2112, ampersands rendered via `SmartAnswer::ErbRenderer` have
not been HTML-escaped. Now that we are rendering question content via this
renderer, we need to update the content in the ERB template to use the HTML
entity for ampersand.
floehopper added a commit that referenced this pull request Nov 19, 2015
Since #2098 & #2112, apostrophes rendered via `SmartAnswer::ErbRenderer` have
not been HTML-escaped. Now that we are rendering question content via this
renderer, we need to update the regression test artefacts for question pages
accordingly.

I ran the following commands to do this:

    $ find test/artefacts/uk-benefits-abroad -name '*.html' -print0 | xargs -0 sed -i .bak "s/'/'/g"
    $ git clean -fd test/artefacts/uk-benefits-abroad/**/*.bak
floehopper added a commit that referenced this pull request Nov 19, 2015
Since #2098 & #2112, apostrophes rendered via `SmartAnswer::ErbRenderer` have
not been HTML-escaped. Now that we are rendering question content via this
renderer, we need to update the regression test artefacts for question pages
accordingly.

I ran the following commands to do this:

    $ find test/artefacts/inherits-someone-dies-without-will -name '*.html' | xargs sed -i .bak "s/'/'/g"
    $ git clean -fd test/artefacts/inherits-someone-dies-without-will/**/*.bak
floehopper added a commit that referenced this pull request Nov 19, 2015
Since #2098 & #2112, apostrophes rendered via `SmartAnswer::ErbRenderer` have
not been HTML-escaped. Now that we are rendering question content via this
renderer, we need to update the regression test artefacts for question pages
accordingly.

I ran the following commands to do this:

    $ find test/artefacts/uk-benefits-abroad -name '*.html' -print0 | xargs -0 sed -i .bak "s/'/'/g"
    $ git clean -fd test/artefacts/uk-benefits-abroad/**/*.bak
floehopper added a commit that referenced this pull request Nov 19, 2015
Since #2098 & #2112, apostrophes rendered via `SmartAnswer::ErbRenderer` have
not been HTML-escaped. Now that we are rendering question content via this
renderer, we need to update the regression test artefacts for question pages
accordingly.

I ran the following commands to do this:

    $ find test/artefacts/pip-checker -name '*.html' -print0 | xargs -0 sed -i .bak "s/'/'/g"
    $ git clean -fd test/artefacts/pip-checker/**/*.bak
floehopper added a commit that referenced this pull request Nov 19, 2015
Since #2098 & #2112, apostrophes rendered via `SmartAnswer::ErbRenderer` have
not been HTML-escaped. Now that we are rendering question content via this
renderer, we need to update the regression test artefacts for question pages
accordingly.

I ran the following commands to do this:

    $ find test/artefacts/plan-adoption-leave -name '*.html' -print0 | xargs -0 sed -i .bak "s/'/'/g"
    $ git clean -fd test/artefacts/plan-adoption-leave/**/*.bak
floehopper added a commit that referenced this pull request Nov 19, 2015
Since #2098 & #2112, apostrophes rendered via `SmartAnswer::ErbRenderer` have
not been HTML-escaped. Now that we are rendering question content via this
renderer, we need to update the regression test artefacts for question pages
accordingly.

I ran the following commands to do this:

    $ find test/artefacts/simplified-expenses-checker -name '*.html' -print0 | xargs -0 sed -i .bak "s/'/'/g"
    $ git clean -fd test/artefacts/simplified-expenses-checker/**/*.bak
floehopper added a commit that referenced this pull request Nov 19, 2015
Since #2098 & #2112, ampersands rendered via `SmartAnswer::ErbRenderer` have
not been HTML-escaped. Now that we are rendering question content via this
renderer, we need to update the content in the ERB template to use the HTML
entity for ampersand.
floehopper added a commit that referenced this pull request Nov 19, 2015
Since #2098 & #2112, apostrophes rendered via `SmartAnswer::ErbRenderer` have
not been HTML-escaped. Now that we are rendering question content via this
renderer, we need to update the regression test artefacts for question pages
accordingly.

I ran the following commands to do this:

    $ find test/artefacts/maternity-paternity-calculator -name '*.html' -print0 | xargs -0 sed -i .bak "s/'/'/g"
    $ git clean -fd test/artefacts/maternity-paternity-calculator/**/*.bak
floehopper added a commit that referenced this pull request Nov 19, 2015
Since #2098 & #2112, double-quotes rendered via `SmartAnswer::ErbRenderer` have
not been HTML-escaped. Now that we are rendering question content via this
renderer, we need to update the regression test artefacts for question pages
accordingly.

I ran the following commands to do this:

    $ find test/artefacts/maternity-paternity-calculator -name '*.html' -print0 | xargs -0 sed -i .bak "s/"/\"/g"
    $ git clean -fd test/artefacts/maternity-paternity-calculator/**/*.bak
floehopper added a commit that referenced this pull request Nov 19, 2015
Since #2098 & #2112, apostrophes rendered via `SmartAnswer::ErbRenderer` have
not been HTML-escaped. Now that we are rendering question content via this
renderer, we need to update the regression test artefacts for question pages
accordingly.

I ran the following commands to do this:

    $ find test/artefacts/student-finance-calculator -name '*.html' -print0 | xargs -0 sed -i .bak "s/'/'/g"
    $ git clean -fd test/artefacts/student-finance-calculator/**/*.bak
floehopper added a commit that referenced this pull request Nov 19, 2015
Since #2098 & #2112, apostrophes rendered via `SmartAnswer::ErbRenderer` have
not been HTML-escaped. Now that we are rendering question content via this
renderer, we need to update the regression test artefacts for question pages
accordingly.

I ran the following commands to do this:

    $ find test/artefacts/uk-benefits-abroad -name '*.html' -print0 | xargs -0 sed -i .bak "s/'/'/g"
    $ git clean -fd test/artefacts/uk-benefits-abroad/**/*.bak
floehopper added a commit that referenced this pull request Nov 19, 2015
Since #2098 & #2112, apostrophes rendered via `SmartAnswer::ErbRenderer` have
not been HTML-escaped. Now that we are rendering question content via this
renderer, we need to update the regression test artefacts for question pages
accordingly.

I ran the following commands to do this:

    $ find test/artefacts/maternity-paternity-calculator -name '*.html' -print0 | xargs -0 sed -i .bak "s/'/'/g"
    $ git clean -fd test/artefacts/maternity-paternity-calculator/**/*.bak
floehopper added a commit that referenced this pull request Nov 19, 2015
Since #2098 & #2112, double-quotes rendered via `SmartAnswer::ErbRenderer` have
not been HTML-escaped. Now that we are rendering question content via this
renderer, we need to update the regression test artefacts for question pages
accordingly.

I ran the following commands to do this:

    $ find test/artefacts/maternity-paternity-calculator -name '*.html' -print0 | xargs -0 sed -i .bak "s/"/\"/g"
    $ git clean -fd test/artefacts/maternity-paternity-calculator/**/*.bak
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

Successfully merging this pull request may close these issues.

2 participants