Comments (10)
I don't know if it's related, but I've noticed that ?language=null
is appended to the key of each localstorage item (which seems to be used for tracking/persisting change state):
UPDATE: This does not seem related (I've just checked on a v3 site which also has this issue and the language query param is not on the key).
from kirby.
This issue was related to special characters. If you share the content file of the page you have the issue, maybe we can replicate the issue and find a solution.
from kirby.
This issue was related to special characters.
So it's a known issue?
Any further context to point to here (other issues, PRs) (I've looked but haven't been able to find any).
If you share the content file of the page you have the issue, maybe we can replicate the issue and find a solution.
Unfortunately it's within the context of a closed source project.
I'll try to create an isolated test case that reproduces it.
It's worth pointing out the following workaround (that suggests this isn't related to special chars in the content file):
- On a page with the issue...
- Reload the page (i.e. click the browser's "refresh" button)
- Before making any content changes, click the "Revert" button
- It works (no issue)
However, if you make changes before clicking the "Revert" button it does not work.
from kirby.
Found some context:
from kirby.
Alright, read through some of the past context and found the following:
- I'm only seeing the issue when changes are made inside a text block (i suppose any type of input field that uses prosemirror)
- The issue seems to be from
getting inserted (from pasted content). It's not visible in the editor. I've noticed these characters so far only between sentences when the author used double spaces between them. - The site I'm seeing this on has lots of migrated content from a legacy WP site. There's lots of poorly formatted HTML that includes
in the plain text source.
from kirby.
Seems the primary PR that previously addressed this (#3758) was mostly around
.
I can reliably reproduce this by pasting HTML that contains
into a writer field instance.
So to reproduce:
- Open a page with a writer field input
- Paste html into it that contains
(tried to add this here but it seems GitHub's markdown handling strips it) - Save
- Reload
- Make a change in the field
- Click the "Revert" button
- Notice that the "Change" and "Save" buttons are still there
Question:
Is there any reason to preserve
instances in pasted text? GitHub seems to be stripping it.
Maybe the simplest "fix" is to replace all
instances with actual spaces on paste. To handle existing content in this state the same "replace" approach could be done on save (as a sanitization step).
from kirby.
I could replicate it as described, @igregson, thanks.
What It seems to be:
After saving and reloading, our backend sends the field value with a normal space or actual non-breaking space (probably the latter, but not sure yet). But ProseMirror will return it after the input as
. So our content store is comparing those strings against each other and determine that they are not equal, though changed. This is why hitting "Revert" is not fixing it as there wills till be the normal (non-breaking) space vs. the encoded  :
.
from kirby.
@bastianallgeier @lukasbestle How can we preserve  :
when the text is processed by Parsley?
from kirby.
TBH I can't really help here as I wasn't involved in the development of Parsley.
from kirby.
@lukasbestle My mistake, I always mix up Parsley and Sane there.
from kirby.
Related Issues (20)
- Trailing link is broken when rendering writer field with `widont()` HOT 1
- Ctrl + S in structure field containing date fields clears content HOT 3
- Impossible to remove date field content HOT 1
- Using the quickstart guide creating a new kirby project with composer leads into a frontpage with missing images HOT 4
- Error deleting page with virtual grandchildren HOT 4
- Adding role-specific `preview` permission to blueprint results in Panel error HOT 2
- [Panel] Email Dialog: Wrong translation key for title field
- Duplicated pages with copy files enabled still links to original files UUID HOT 1
- Page tables load very slow in 4.2 HOT 18
- Date field behaves weird when "display" MM/YYYY is used
- Search in panel shows old results when response times from server vary HOT 1
- Calendar not working with empty date field included in a structure field
- Unsaved changes bubble clipped and wrongly position on active/hovered tab HOT 1
- Files: don't run thumb processing if image smaller than the `create` dimensions HOT 2
- Hide page view options dropdown with no actionable options HOT 3
- Unexpected issue with sorting on setting the num prop when creating pages in code. HOT 4
- Failing Test for DateTest
- Non existing files throw error 500: the thumbnail configuration could not be found
- `k-table`: index column too narrow for high indexes HOT 1
- File browser doesn't start at current page HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from kirby.