Escaping " in search queries in Load More Posts button #673
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.
The Problem
This attempts to incorporate a fix for CUR-113:
It fails on
"future fund"
and"future fund
but notfuture fund
.Pressing the "Load more posts" button sends a query to the site with the following form data:
This fix escapes the query vars with
JSON.stringify()
on theLMP.query
args array:And then strips the slashes before running the query.
However, tests are failing, regarding the value of the
paged
parameter, and it appears to be affecting the pagination of posts on category pages.This PR is a WIP until those get fixed.