Ticket #232 (closed defect: fixed)

Opened 1 year ago

Last modified 1 year ago

Scandinavian characters brakes pages plugin

Reported by: encore Assigned to: rho
Priority: high Milestone: 0.9.0
Component: plugins Version: 0.9rc2
Severity: normal Keywords:
Cc: rho Patch Included:
Review Stage:

Description

Using scandinavian characters (for example ä = ä) causes the pages plugin to miss everything after the first used scandinavian character when saving a page. For example if you write following content: "This is my test ä where I'm telling a lot of stuff..." The page saves only string "This is my test " and nothing else. This is quite fatal for scandinavian users as we use a lot of these characters.

Attachments

01222_pages_prevent_parsing_tags.diff (1.0 kB) - added by rho on 12/22/07 13:52:00.
0122201_pages_prevent_parsing_tags.diff (1.1 kB) - added by rho on 12/22/07 14:19:49.
updated

Change History

12/22/07 13:30:30 changed by ewout

  • cc set to rho.

Yes, there seems to a problem with the character encoding and entity conversion. I had problems with accented caracters which were converted from utf-8 to iso-8859-1. This I could solve by putting htmlentities($page->content,ENT_NOQUOTES,'utf-8') in line 429 of pages.inc.php. But the htmlentity problem is not solved in that way. It is strange that the htmlentity → is treated ok, but entities for accented characters like ä give problems.

12/22/07 13:52:00 changed by rho

  • attachment 01222_pages_prevent_parsing_tags.diff added.

12/22/07 13:53:40 changed by rho

  • owner set to rho.
  • status changed from new to assigned.

could you test the attached path?

12/22/07 14:08:12 changed by encore

Yes the patch fixes the scandinavian characters issue but also introduces a new bug. If you use line feeds they are stripped out (or don't get converted into <br> html tag).

12/22/07 14:09:52 changed by encore

Oh just forget my previous note about the line feeds :) The patch is OK, thanks!

12/22/07 14:11:22 changed by ewout

The patch seems to work. I can now work with accented characters like ä and also html entities like &auml;.

The only problem I can see now is that if I put in for example &auml; it gets transformed into ä in the textarea (I don't know why or where this happens). What we really want is what Trac does: just leave html entities the way they were entered.

(follow-up: ↓ 8 ) 12/22/07 14:13:58 changed by encore

You don't need to fix that as it now works like it should. The HTML &auml; stands for ä character and it should translate into ä. Previously using &auml; in the pages caused the mod to miss everything after the tag when the page was saved. Now it works all good.

12/22/07 14:19:49 changed by rho

  • attachment 0122201_pages_prevent_parsing_tags.diff added.

updated

(follow-up: ↓ 9 ) 12/22/07 14:21:28 changed by rho

try the latest patch against svn

(in reply to: ↑ 6 ) 12/22/07 14:29:02 changed by ewout

Replying to encore:

You don't need to fix that as it now works like it should. The HTML &auml; stands for ä character and it should translate into ä. Previously using &auml; in the pages caused the mod to miss everything after the tag when the page was saved. Now it works all good.

Yeah, it is a minor problem, I agree. My point was that the user must have had their reasons to input &mu; instead of μ. It may suprise the user if the entity gets transformed magically into a μ. Maybe the user had no way to input μ directly from her keyboard and she wants to keep her stuff in the form of entities. Anyway, as I said, minor problem.

(in reply to: ↑ 7 ) 12/22/07 14:33:47 changed by ewout

Replying to rho:

try the latest patch against svn

Yes, perfect.

12/22/07 14:39:10 changed by rho

  • status changed from assigned to closed.
  • resolution set to fixed.

commited [1485]