Anonymous | Login | Signup for a new account | 12-17-2024 08:24 PST |
Main | My View | View Issues | Change Log | Docs |
Viewing Issue Simple Details [ Jump to Notes ] | [ View Advanced ] [ Issue History ] [ Print ] | ||||||||
ID | Category | Severity | Reproducibility | Date Submitted | Last Update | ||||
0003314 | [Quercus] | minor | always | 02-02-09 08:17 | 02-02-09 20:34 | ||||
Reporter | tlandmann | View Status | public | ||||||
Assigned To | nam | ||||||||
Priority | normal | Resolution | fixed | ||||||
Status | closed | Product Version | 3.2.1 | ||||||
Summary | 0003314: html_entity_decode() not Unicode-compatible | ||||||||
Description |
The source code of the function is as follows: -------------------- public static StringValue html_entity_decode(Env env, StringValue string, @Optional int quoteStyle, @Optional String charset) { if (string.length() == 0) return env.getEmptyString(); Iterator<Map.Entry<Value,Value>> iter; if (env.isUnicodeSemantics()) iter = HTML_ENTITIES_ARRAY_UNICODE.getIterator(env); // LINE 380 else iter = HTML_ENTITIES_ARRAY.getIterator(env); while (iter.hasNext()) { Map.Entry<Value,Value> entry = iter.next(); StringValue key = entry.getKey().toStringValue(); StringValue value = entry.getValue().toStringValue(); string = RegexpModule.ereg_replace(env, value, key, string).toStringValue(); } return string; } -------------------- Line 380 (iter = HTML_ENTITIES_ARRAY_UNICODE.getIterator(env);) causes a NullPointerException because HTML_ENTITIES_ARRAY_UNICODE is not set. Temporary workaround: Call htmlentities(" ") once right before using html_entity_decode() for the first time. This helps because htmlentities(), unlike html_entity_decode(), initializes the array if it still equals null (line 319). However, I'd be happy if the problem could be fixed soon. |
||||||||
Additional Information | |||||||||
Attached Files | |||||||||
|
Notes | |
(0003797) nam 02-02-09 20:34 |
At the moment, using unicode.semantics="true" is not recommended. php/0jl0 |
Mantis 1.0.0rc3[^]
Copyright © 2000 - 2005 Mantis Group
29 total queries executed. 26 unique queries executed. |