BookStackApp / BookStack

A platform to create documentation/wiki content built with PHP & Laravel
https://www.bookstackapp.com/
MIT License
15.29k stars 1.91k forks source link

Revisions include all accent char visually unmodified #4072

Open eoli3n opened 1 year ago

eoli3n commented 1 year ago

Describe the Bug

If I modify a page with Linux, then a coworker modify with Windows, all accent chars seems to be replaced.

Steps to Reproduce

  1. Modify a page on Void Linux - Firefox 109.0.1
  2. Modify the same page on Windows 10 Professional 21H1 - Opera version 94
  3. BOOM

Expected Behaviour

Nothing should change in the page.

Screenshots or Additional Context

accent

Browser Details

Latest Void Linux - Firefox 109.0.1 Windows 10 Professional 21H1 - Opera version 94

Exact BookStack Version

v23.01.1

PHP Version

7.4

Hosting Environment

Debian 11 up to date

ssddanbrown commented 1 year ago

Thanks for reporting, some following up questions to help understand the scenario:

Development notes

Original thought this was due to unicode handling by diff lib but could not replicate in single environment. Thinking possible change in encoding.

eoli3n commented 1 year ago

WYSIWIYG editor on both, yes. No copy paste at all.

carlossierra311 commented 3 months ago

I am experiencing this same issue. I hadn't noticed it before v24.05.3, and I use page revisions extensively with content that is heavy on accents (Spanish). But according to the original bug report date, it would seem unlikely to have been introduced on this version (could it be a regression?).

I use the WYSIWYG editor, and it happens with content both copied from other sources, and with text created directly in BookStack.

Chrome Versión 127.0.6533.89 (Build oficial) (64 bits) Windows 10 Pro 22H2 (OS Compilation 19045.4717)

watschi commented 19 hours ago

Found a way to reproduce this, since we are seeing this issue quite often, too (german umlauts).

  1. Create a new page with umlauts, content: Some umlauts on this page: äöü with user1, save the page
  2. Edit the page with user1, create a new paragraph New Draft paragraph, save as draft
  3. Edit the page with user2, add a new paragraph New paragraph by different user, save the page
  4. Open revisions and view changes as user1, see umlauts highlighted

Screenshot from the demo instance: grafik

Interestingly, on the screenshot above the content of the draft by user1 from step 2 was also marked as deleted, even though it was never supposed to be published at all. Both users see the same changes.

Also, after deleting the existing draft as user1 and viewing the changes of the current revision again, the umlauts are not highlighted anymore and the content of the draft is not displayed anymore:

grafik

It seems like drafts are incorrectly referenced as the previous version when rendering changes between revisions. Are umlauts and accent chars saved differently in drafts?

Firefox 132.0 (64-Bit) Windows 10 22H2