Ghost/ghost/core
Simon Backx 4534b693e4
Added test that validates output HTML of email template (#15365)
refs https://github.com/TryGhost/Team/issues/1871

This commit adds a test to the serialize method of `post-emaiserializer`. It checks whether the generated email HTML is valid and standard HTML5 and that all properties are escaped.

To do this validation, I depend on the new `html-validate` dev dependency. Just parsing the HTML with a HTML parser is not enough to guarantee that the HTML is okay.

Apart from that this fixes:
- Removed the sanitizeHTML method and replaced it with normal HTML escaping. We don't want to allow any HTML in the escaped fields. Whereas `sanitizeHTML` still allows valid HTML, but we don't want that and want the same behaviour as on the site. E.g., a post with a title `All your need to know about the <br /> tag` should actually render the same title and non-html content, being `All your need to know about the &lt;br /&gt; tag`
- The file, nft and audio card didn't (always) escape the injected HTML fields (new version @tryghost/kg-default-cards) 
- `@tryghost/string` is bumped because it contains the new escapeHtml method
2022-09-08 10:11:01 +02:00
..
content Updated Explore section on dashboard 2022-09-06 14:59:33 +01:00
core Added test that validates output HTML of email template (#15365) 2022-09-08 10:11:01 +02:00
test Added test that validates output HTML of email template (#15365) 2022-09-08 10:11:01 +02:00
.c8rc.json Extracted shared API framework to separate package 2022-08-11 17:44:59 +02:00
.eslintignore Added member attribution script (#15242) 2022-08-16 15:44:51 +02:00
.eslintrc.js Updated Eslint ECMAScript compatibility to 2022 2022-08-09 15:51:40 +02:00
.gitignore Added copied release assets into .gitignore 2022-08-10 14:19:16 +02:00
.npmignore Cleaned up npmignore entries for Casper 2022-09-01 08:22:01 +01:00
config.development.json Converted Ghost repo into a monorepo 2022-07-20 16:41:05 +02:00
ghost.js Converted Ghost repo into a monorepo 2022-07-20 16:41:05 +02:00
Gruntfile.js Cleaned up core package Gruntfile 2022-08-08 13:03:49 +02:00
index.js Converted Ghost repo into a monorepo 2022-07-20 16:41:05 +02:00
jsconfig.json Deleted reference to core/admin 2022-08-03 16:28:41 +02:00
loggingrc.js Switched to original version for metrics 2022-08-04 19:22:57 +02:00
MigratorConfig.js Converted Ghost repo into a monorepo 2022-07-20 16:41:05 +02:00
package.json Added test that validates output HTML of email template (#15365) 2022-09-08 10:11:01 +02:00