-
Notifications
You must be signed in to change notification settings - Fork 385
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
Add support for comments #871
Closed
Closed
Changes from 1 commit
Commits
Show all changes
39 commits
Select commit
Hold shift + click to select a range
7ec60e4
Make add `get_dom` method to AMP_DOM_Utils
DavidCramer eed214f
add amp_form_sanitizer
DavidCramer 4067b59
add form sanitisation on output buuffer
DavidCramer a8d2ad3
merge develop in
DavidCramer 98874ba
Merge develop
DavidCramer 4f6dcd6
add comments REST endpoints
DavidCramer 317f90f
Add AMP Comments Walker
DavidCramer 451db91
Add comments template overrides and methods
DavidCramer 0541686
add comment sanitizer
DavidCramer 2c8575e
Make walker add the HTML to reduce load in the sanitiser.
DavidCramer ac0cc53
its a filter, not an action.
DavidCramer 2741fdf
Merge develop
DavidCramer ebffaae
add form sanitisation changes
DavidCramer 9790be3
make action setting more sane
DavidCramer b425b19
Add sanitisation and component_type method
DavidCramer b7c5963
optimize comments endpoint
DavidCramer 94aee02
wp_unslash request_uri for action attribute.
DavidCramer d0fc6c5
cleaner comments template generation
DavidCramer 6b660b3
merge develop
DavidCramer 69d1342
cleanup formatting
DavidCramer 4200d9e
output comment template on same comments pass
DavidCramer 366bef3
cleanup comments sanitiser and add url template string filtering
DavidCramer 7b63836
add comment template url string filters
DavidCramer 8b289c1
remove unnecessary duplicated `wp_list_comments` pass
DavidCramer 15d327d
Hook into AMP xhr-submissions to handle headers and JSON responses.
DavidCramer 561189b
add amp-list fallback for comments.
DavidCramer a1bf8d3
add comment form success and error handlers and wrapper code.
DavidCramer b40e932
lowercase `post` k, thanks.
DavidCramer dc1f9c3
Merge develop
DavidCramer 187e136
fix formatting fail.
DavidCramer 82e8021
if no template, move on.
DavidCramer d4fd8bc
No need to check for the `amp_comments` tag anymore.
DavidCramer bbabbd7
add tests for form and comment sanitisation.
DavidCramer 0fd1ab5
add docs to tests
DavidCramer 9f99abe
No need to get images again.
DavidCramer 9216e4e
check has images before converting urls
DavidCramer fafa679
fix phpdoc
DavidCramer 9536794
Merge branch 'develop' of https://github.com/Automattic/amp-wp into a…
westonruter 74ae3b5
Prevent saveHTML from munging amp-mustache curly braces via URL-encoding
westonruter 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 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 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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@westonruter component scripts are have
custom-element
in the script tags, howeveramp-mustache
used foramp-list
does not, instead it hascustom-template
. see https://www.ampproject.org/docs/reference/components/amp-mustacheIt looks like this is the only component that's different, however I separated it to its own method in case the spec changes, or additionals are added in future.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think get_component_type would be needed if we sanitize the entire body, right?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@westonruter I think we still do, since this is done after the sanitisation and the scripts are placed in. All the scripts are
custom-element
but the template iscustom-template
.