BookStack icon indicating copy to clipboard operation
BookStack copied to clipboard

Revisions include all accent char visually unmodified

Open eoli3n opened this issue 2 years ago • 3 comments

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

eoli3n avatar Feb 27 '23 14:02 eoli3n

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

  • What was the page editor used (WYSWIYG/Markdown) to save both compared versions?
  • Was the content originally copied and pasted into BookStack from another source?

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.

ssddanbrown avatar Feb 27 '23 15:02 ssddanbrown

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

eoli3n avatar Feb 27 '23 15:02 eoli3n

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)

carlossierra311 avatar Aug 02 '24 15:08 carlossierra311

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

watschi avatar Nov 05 '24 07:11 watschi