-
Notifications
You must be signed in to change notification settings - Fork 953
fixes a bug where yoast markers break html of content in shopify and classic #19499
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
Closed
hdvos
wants to merge
28
commits into
feature/lingo-fixes
from
19477-yoast-markers-break-html-of-content-in-shopify-and-classic
Closed
Changes from 5 commits
Commits
Show all changes
28 commits
Select commit
Hold shift + click to select a range
378070e
fix problem with marking anchors
hdvos cfe0adf
adapt specs to new createRegexFromArray
hdvos d589a67
change default for ignoreWhenInHtmlTag to true
hdvos e9e2cf4
add support for the acf plugin
hdvos a71f9b3
remove unused import
hdvos ab45047
add extra parentheses
hdvos d857be5
add explanation
hdvos dd6780c
add and adapt specs
hdvos 635a030
remove ignoreWhenInHtmlTag parameter
hdvos 5d987a0
add coment for clarity
hdvos 95a7d02
change check for acf being active.
hdvos f761234
adapt specs
hdvos 0cf1feb
Merge branch 'feature/lingo-fixes' of github.com:Yoast/wordpress-seo …
FAMarfuaty 607618e
Merge branch 'feature/lingo-fixes' of github.com:Yoast/wordpress-seo …
FAMarfuaty ce00088
semtence tokenizer fix
hdvos 0bb3a64
add jsdoc
hdvos 47fb48c
modify extra check for removing outer html tags
hdvos 15a900b
update isValidPair check
hdvos ce47473
add specs for isValidPair
hdvos ea41f13
adapt fulltestTexts
hdvos f671bad
commit snapshots
hdvos 334ff13
rename function
hdvos c7c46cc
Merge branch 'feature/lingo-fixes' into 19477-yoast-markers-break-htm…
hdvos 3406065
adapt specs
hdvos 8314ed9
rename replaceQuotes to normalizeHTML
hdvos 295c178
Fix typo
hdvos 4b8dddc
Update JSdoc
hdvos 1f50fa9
fix non breaking space problem.
hdvos 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
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
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
14 changes: 14 additions & 0 deletions
14
packages/yoastseo/src/languageProcessing/helpers/html/replaceQuotes.js
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,14 @@ | ||
| /** | ||
| * Replaces single quotes around HTML attribute values with double quotes. | ||
| * Double quotes are the standard, but we convert these to single quotes when parsing the HTML in `yoastseo` package. | ||
| * Here, we change them back to double quotes so by parsing the HTML and then outputting it again. | ||
| * | ||
| * @param {string} str The input string. | ||
| * | ||
| * @returns {string} The string with single quotes around HTML attributes replaced with double quotes. | ||
| */ | ||
| export default function( str ) { | ||
| const element = document.createElement( "body" ); | ||
| element.innerHTML = str; | ||
| return element.innerHTML; | ||
| } |
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
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.