-
Notifications
You must be signed in to change notification settings - Fork 6
Eqs 766 add html validation #387
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
Merged
Merged
Changes from all commits
Commits
Show all changes
35 commits
Select commit
Hold shift + click to select a range
e7a0c31
stack based html tag validation
oms09 af6fd13
error msg
oms09 a00a83d
invalid html tag test
oms09 aecdd82
test invalid tag
oms09 13d2916
validate html entities
oms09 b06f9b4
html entity test
oms09 3a99267
update allowed tags
oms09 6aa9e96
updated allowed tags
oms09 e1413b8
update slice removing last char
oms09 b1b7b7e
update unit test
oms09 cc3dedd
space before br tag
oms09 adac41b
update tags & check br whitespace
oms09 7238924
unit test for whitespace before <br>
oms09 12efea7
Merge branch 'main' into eqs-766-add-html-validation
oms09 e869b2e
lint & refactor
oms09 b3e0b4c
Merge branch 'eqs-766-add-html-validation' of github.com:ONSdigital/e…
oms09 6a26f9b
update hex entity var name
oms09 8fa1a27
eq_translation error updated get_translatable_items
oms09 d0e69de
check p tag position
oms09 6406ebe
p tag position test
oms09 a31dbae
docstring & lint
oms09 5d0851b
Merge branch 'main' into eqs-766-add-html-validation
oms09 adbc7a4
Merge branch 'main' into eqs-766-add-html-validation
oms09 be69399
update docstring and error message name
oms09 717470c
error msg update
oms09 3396946
Merge branch 'main' into eqs-766-add-html-validation
oms09 8f52fe8
Merge branch 'main' into eqs-766-add-html-validation
oms09 40885e2
Merge branch 'main' into eqs-766-add-html-validation
oms09 7660153
update msg & indent
oms09 dadf743
Merge branch 'main' into eqs-766-add-html-validation
oms09 6bdc4a5
docstring n name change
oms09 4867524
Merge branch 'eqs-766-add-html-validation' of github.com:ONSdigital/e…
oms09 54c277d
update test text
oms09 6735d8b
br tag whitespace name
oms09 d928bfa
Merge branch 'main' into eqs-766-add-html-validation
oms09 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Some comments aren't visible on the classic Files Changed page.
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,133 @@ | ||
| { | ||
| "mime_type": "application/json/ons/eq", | ||
| "language": "en", | ||
| "schema_version": "0.0.1", | ||
| "data_version": "0.0.3", | ||
| "survey_id": "144", | ||
| "theme": "default", | ||
| "title": "Test invalid html", | ||
| "legal_basis": "Notice is given under section 999 of the Test Act 2000", | ||
| "metadata": [ | ||
| { | ||
| "name": "user_id", | ||
| "type": "string" | ||
| }, | ||
| { | ||
| "name": "period_id", | ||
| "type": "string" | ||
| }, | ||
| { | ||
| "name": "ru_name", | ||
| "type": "string" | ||
| }, | ||
| { | ||
| "name": "ru_ref", | ||
| "type": "string" | ||
| }, | ||
| { | ||
| "name": "trad_as", | ||
| "type": "string", | ||
| "optional": true | ||
| } | ||
| ], | ||
| "questionnaire_flow": { | ||
| "type": "Linear", | ||
| "options": {} | ||
| }, | ||
| "sections": [ | ||
| { | ||
| "id": "introduction-section", | ||
| "title": "Introduction <br>", | ||
| "groups": [ | ||
| { | ||
| "id": "introduction-group", | ||
| "title": "<p>General Business Information", | ||
| "blocks": [ | ||
| { | ||
| "id": "introduction", | ||
| "type": "Introduction", | ||
| "primary_content": [ | ||
| { | ||
| "id": "business-details", | ||
| "title": "Introduction with &fake; valid and invalid HTML", | ||
| "contents": [ | ||
| { | ||
| "guidance": { | ||
| "contents": [ | ||
| { | ||
| "title": "<invalid>Coronavirus (COVID-19) guidance</invalid>", | ||
| "description": "<strong>Explain your figures</strong> in the comment section to minimise us & contacting you and to help us tell an industry story" | ||
| } | ||
| ] | ||
| } | ||
| } | ||
| ] | ||
| } | ||
| ] | ||
| }, | ||
| { | ||
| "type": "Interstitial", | ||
| "id": "intersitital-one", | ||
| "content": { | ||
| "title": "Page <p>with invalid html</p> in title", | ||
| "contents": [ | ||
| { | ||
| "description": "[<p>You have successfully completed this section</p>]" | ||
| } | ||
| ] | ||
| } | ||
| }, | ||
| { | ||
| "type": "Interstitial", | ||
| "id": "interstitial-two", | ||
| "content": { | ||
| "title": "Page with link", | ||
| "contents": [ | ||
| { | ||
| "description": "<a href='link'>Anchor</a>" | ||
| } | ||
| ] | ||
| } | ||
| }, | ||
| { | ||
| "type": "Interstitial", | ||
| "id": "interstitial-three", | ||
| "content": { | ||
| "title": "<strong>Page with mixed invalid tags</strong>", | ||
| "contents": [ | ||
| { | ||
| "description": "<h1>Title</h1><em>Not valid tag</em>" | ||
| } | ||
| ] | ||
| } | ||
| }, | ||
| { | ||
| "type": "Interstitial", | ||
| "id": "interstitial-four", | ||
| "content": { | ||
| "title": "Valid double <strong>strong</strong> with another <strong>strong</strong>.", | ||
| "contents": [ | ||
| { | ||
| "description": "<strong>Title</strong><em>Not valid tag</em>" | ||
| } | ||
| ] | ||
| } | ||
| }, | ||
| { | ||
| "type": "Interstitial", | ||
| "id": "interstitial-five", | ||
| "content": { | ||
| "title": "Valid double anchor.", | ||
| "contents": [ | ||
| { | ||
| "description": "<a href='link'>Title</a> and <a href='link-2'>valid tag</a>" | ||
| } | ||
| ] | ||
| } | ||
| } | ||
| ] | ||
| } | ||
| ] | ||
| } | ||
| ] | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.