Giter Club home page Giter Club logo

Comments (6)

igregson avatar igregson commented on May 24, 2024

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):

CleanShot 2024-02-21 at 17 20 49@2x

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.

afbora avatar afbora commented on May 24, 2024

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.

igregson avatar igregson commented on May 24, 2024

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):

  1. On a page with the issue...
  2. Reload the page (i.e. click the browser's "refresh" button)
  3. Before making any content changes, click the "Revert" button
  4. It works (no issue)

However, if you make changes before clicking the "Revert" button it does not work.

from kirby.

igregson avatar igregson commented on May 24, 2024

Found some context:

from kirby.

igregson avatar igregson commented on May 24, 2024

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.

igregson avatar igregson commented on May 24, 2024

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:

  1. Open a page with a writer field input
  2. Paste html into it that contains   (tried to add this here but it seems GitHub's markdown handling strips it)
  3. Save
  4. Reload
  5. Make a change in the field
  6. Click the "Revert" button
  7. 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.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.