View Issue Details
| ID | Project | Category | View Status | Date Submitted | Last Update |
|---|---|---|---|---|---|
| 0000232 | WackoWiki | upload | public | 2008-10-01 14:53 | 2009-08-19 09:38 |
| Reporter | dvg_lab | Assigned To | administrator | ||
| Priority | normal | Severity | minor | Reproducibility | always |
| Status | resolved | Resolution | fixed | ||
| Target Version | 4.3.rc | Fixed in Version | 4.3.rc | ||
| Summary | 0000232: file upload description: russian chars incorrectly inserting to a database | ||||
| Description | the bug in handlers/page/upload.php if you write russian description it inserts some buggy chars into a page here is the patch in attached file. | ||||
| Tags | No tags attached. | ||||
| Attached Files | patch.txt (554 bytes)
--- upload.php.orig 2008-10-01 17:19:46.000000000 +0400
+++ upload.php 2008-10-01 17:19:59.000000000 +0400
@@ -183,7 +183,7 @@
// Make HTML in the description redundant ;�)
$description = $this->Format($description, "preformat");
$description = $this->Format($description, "safehtml");
- $description = htmlentities($description);
+ $description = htmlentities($description,ENT_COMPAT,$this->GetCharset());
// 5. insert line into DB
$this->Query("insert into ".$this->config["table_prefix"]."upload set ".
| ||||
|
|
ToDo: Check if this is the only place where this issue occurs. |
|
|
@ dvg_lab can you provide an example we can use for testing |
|
|
sorry, I can't show it on my wiki installation, but the function htmlentities() uses wrong charset by default (it seemed to me it wrong when charset is not latin or standart ISO), I think in any case using current charset as $this->GetCharset() looks good for other languages too. AFAIK htmlentities() tries to identify right charset automatically, but does it not so good. my environment: MySQL DB charset: cp1251, cp1251_general_ci wiki charset: cp1251 russian comment: русский комментарий |
|
|
I could reproduce the error and tested the patch successfully. Thanks. It is still a mess if you change only one language setting, we need UTF-8 a.s.a.p. FIXED and SVNed with revision 167 |
| Date Modified | Username | Field | Change |
|---|---|---|---|
| 2008-10-01 14:53 | dvg_lab | New Issue | |
| 2008-10-01 14:53 | dvg_lab | File Added: patch | |
| 2008-10-01 14:53 | dvg_lab | Legacy | => NEW |
| 2008-10-01 15:17 | administrator | Status | new => acknowledged |
| 2008-10-01 15:17 | administrator | Target Version | => 5.0.0 |
| 2008-10-01 15:22 | administrator | Note Added: 0000518 | |
| 2008-10-01 16:04 | administrator | File Added: patch.txt | |
| 2008-10-01 16:05 | administrator | File Deleted: patch | |
| 2008-10-01 18:11 | administrator | Note Added: 0000519 | |
| 2008-10-01 18:12 | administrator | Note Edited: 0000518 | |
| 2008-10-08 11:34 | dvg_lab | Note Added: 0000520 | |
| 2008-10-08 15:57 | administrator | Note Added: 0000521 | |
| 2008-10-08 15:58 | administrator | Assigned To | => administrator |
| 2008-10-08 15:58 | administrator | Status | acknowledged => resolved |
| 2008-10-08 15:58 | administrator | Resolution | open => fixed |
| 2008-10-08 15:58 | administrator | Product Version | 5.0.0 => |
| 2008-10-08 15:58 | administrator | Fixed in Version | => 5.0.0 |
| 2008-10-08 16:10 | administrator | Summary | russian chars incorrectly inserting to a database => file upload description: russian chars incorrectly inserting to a database |
| 2008-10-09 16:31 | administrator | Note Edited: 0000521 | |
| 2008-10-09 17:25 | administrator | Note Edited: 0000518 | |
| 2009-08-19 09:25 | administrator | Fixed in Version | 5.0.0 => 4.3.rc |
| 2009-08-19 09:38 | administrator | Target Version | 5.0.0 => 4.3.rc |
| 2010-03-08 10:23 | administrator | Category | Upload => upload |