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

fix(renderer): avoid double encoding of document attributes #296

Merged
merged 1 commit into from
Feb 20, 2019

Conversation

xcoulon
Copy link
Member

@xcoulon xcoulon commented Feb 17, 2019

unescape the document attributes substitution before it
is escaped again

fixes #295

Signed-off-by: Xavier Coulon [email protected]

@xcoulon xcoulon force-pushed the Issue295_attributes_encoding branch from bf77231 to 7a002c5 Compare February 19, 2019 20:41
render all elements and apply substitutions, then if applicable
(ie, there were some substitutions), then parse the inline elements
again and render the elements, but with plain string output for
the StringElements to avoid double HTML escaping

also:
- do not treat `++` as an empty single plus passthrough (but
keep `++++++` as an empty triple plus passthrough for now)
- render `++` as `&bytesparadise#43;&bytesparadise#43;`
- accept that `InlineElementsWithoutSubtitution` can be empty
(which happens if the only content was `{blank}` which is trimmed
after rendering)

fixes bytesparadise#295

Signed-off-by: Xavier Coulon <[email protected]>
@xcoulon xcoulon force-pushed the Issue295_attributes_encoding branch from 7a002c5 to e63f9ab Compare February 19, 2019 20:41
@codecov
Copy link

codecov bot commented Feb 19, 2019

Codecov Report

Merging #296 into master will decrease coverage by 0.91%.
The diff coverage is 58.69%.

@@            Coverage Diff             @@
##           master     #296      +/-   ##
==========================================
- Coverage   85.17%   84.25%   -0.92%     
==========================================
  Files          38       38              
  Lines        3851     3887      +36     
==========================================
- Hits         3280     3275       -5     
- Misses        432      474      +42     
+ Partials      139      138       -1

@xcoulon xcoulon merged commit 00c0132 into bytesparadise:master Feb 20, 2019
@xcoulon xcoulon deleted the Issue295_attributes_encoding branch February 20, 2019 06:57
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.

Fix attributes encoding
1 participant