Hello,
I have using TBS for 3 weeks. I like it. but I have found a problem.
I print table from mysql database.
<tr class="tab_rl">
<td>[blk_usr.lastname;block=tr]</td>
<td align="center">[blk_usr.firstname]</td>
<td align="center">[blk_usr.code]</td>
<td align="center">[blk_usr.specialisation]</td>
<td>[blk_usr.work]</td>
<td>[blk_usr.email]</td>
</tr>
|
In database there is stored semicolons and single quotes.
Print semicolons or single quotes kills TBS.
I have figured out how to solved quotes:
$TBS->LoadTemplate(TEMPLATE_PATH.'page.html','UTF-8');
|
OR
$TBS->LoadTemplate(TEMPLATE_PATH.'page.html';
template file:
add htmlconv=esc
|
but the only solution of the semicolons I have found out is hacking tbs_class.php . line: 2459
function meth_Conv_Str(&$Txt,$ConvBr=true) {
if ($this->Charset==='') { // Html by default
$Txt = htmlspecialchars($Txt);
$Txt = str_replace(";",",",$Txt); //hack replacing ; by ,
if ($ConvBr) $Txt = nl2br($Txt);
} elseif ($this->_CharsetFct) {
$Txt = call_user_func($this->Charset,$Txt,$ConvBr);
} else {
$Txt = htmlspecialchars($Txt,ENT_COMPAT,$this->Charset);
$Txt = str_replace(";",",",$Txt); //hack replacing ; by ,
if ($ConvBr) $Txt = nl2br($Txt);
}
}
|
Does exist any cleaner way how to solve it.
Thank you