osc 2.3 product review recover html function
#-19
Posted 06 May 2012 - 02:55 PM
I would like to recover html function.
DO I simply change product_review_infor.php
and remove tep_output_string_protected?
#-18
Posted 06 May 2012 - 04:43 PM
function tep_output_string($string, $translate = false, $protected = false) {
if ($protected == true) {
return htmlspecialchars($string);
} else {
and try changing it to
function tep_output_string($string, $translate = false, $protected = false) {
if ($protected == true) {
// return htmlspecialchars($string);
return htmlspecialchars($string, ENT_COMPAT|ENT_HTML401, 'UTF-8');
} else {
If it doesn't work, back out the change.
#-17
Posted 07 May 2012 - 03:02 AM
MrPhil, on 06 May 2012 - 04:43 PM, said:
function tep_output_string($string, $translate = false, $protected = false) { if ($protected == true) { return htmlspecialchars($string); } else { and try changing it to function tep_output_string($string, $translate = false, $protected = false) { if ($protected == true) { // return htmlspecialchars($string); return htmlspecialchars($string, ENT_COMPAT|ENT_HTML401, 'UTF-8'); } else { If it doesn't work, back out the change.I tried the change you proposed. No use, although no harm.
My tep_output_string looks like this:
function tep_output_string($string, $translate = false, $protected = false) {
if ($protected == true) {
return htmlspecialchars($string);
} else {
if ($translate == false) {
return tep_parse_input_field_data($string, array('"' => '"'));
} else {
return tep_parse_input_field_data($string, $translate);
}
}
}
Furthermore, to my understanding, my system indeed use UTF-8.
The stored text is correct, since if I edit the stored text it came back correctly.
Only the displayed wrong. Furthermore, the the displayed screen is somewhat misplaced.
A product picture is shown on the upper-right, but overlap with the right column.
Presumably it is CSS problem.
#-16
Posted 07 May 2012 - 03:21 AM
#-15
Posted 07 May 2012 - 06:40 AM
It seems <br/> is intentionally inserted somewhere.
Furthermore, error messages appears saying method button and buttonset are not supported.
buttonset came from
<script type="text/javascript">
$("#headerShortcuts").buttonset();
</script>
#-14
Posted 07 May 2012 - 11:56 AM
It is tep_break_string who inserted - and break the CJK characters.
Edited by xvoyance, 07 May 2012 - 12:09 PM.
#-13
Posted 07 May 2012 - 05:18 PM
Any MB experts out there? If not, I could take a look at it tonight. First, I need to understand when tep_break_string() gets called, and when word wrap is simply left to the browser. If it has to back up all the way to the beginning of the word to avoid breaking within a multibyte character, it would have to be just a <br />.
#-12
Posted 08 May 2012 - 03:00 AM
#-11
Posted 08 May 2012 - 12:43 PM
MrPhil, on 07 May 2012 - 05:18 PM, said:
Any MB experts out there? If not, I could take a look at it tonight. First, I need to understand when tep_break_string() gets called, and when word wrap is simply left to the browser. If it has to back up all the way to the beginning of the word to avoid breaking within a multibyte character, it would have to be just a <br />.
I simply remove that function, then everything looks fine. The line is automatically break.
There is one more question about the product image on the review page.
It is not locate correctly.
I am not sure how is others. Presumably that is a CSS problem?
#-10
Posted 08 May 2012 - 01:31 PM
MrPhil, on 08 May 2012 - 03:00 AM, said:
CJK words are not separated by anything, to my understanding. Sentences are not separated either, unless you put punctuation mark. I do not know what is ideographs (and i tried to look up that word but still do not understand, which perhaps means not related.) Each character should be equally spaced, unless you tried to do some stretching on typesetting, to my understanding.
CJK (Chinese-Japanse-Korean) fonts are difficult to handle but now people should already know pretty well how to do that (although not me). TeX/LaTex used to have difficulty to handle CJK fonts, but now XeLatex within MikTeX do that well (although I do not know how did they do that. I simply use it.)
I cannot attach a screen shut file in this forum. Otherwise I can show you it looks find now Except the product image.
Edited by xvoyance, 08 May 2012 - 01:34 PM.
#-9
Posted 08 May 2012 - 02:16 PM
#-8
Posted 09 May 2012 - 12:17 AM
MrPhil, on 08 May 2012 - 03:00 AM, said:
to my understanding, those two bytes in CJK characters are not identical. One has the first bit set the other left the first bit blank,
so that the system can detect where is the boundary of each character.
#-7
Posted 09 May 2012 - 07:15 PM









