mirror of
https://github.com/tecnickcom/TCPDF.git
synced 2025-03-23 15:39:38 +01:00
Merge pull request #93 from viktorminko/fix-rtl-spaces-reversion
Fix of issue with html tags inside RTL languages
This commit is contained in:
commit
5d6afea865
@ -18328,7 +18328,8 @@ Putting 1 is equivalent to putting 0 and calling Ln() just after. Default value:
|
||||
}
|
||||
// text
|
||||
$this->htmlvspace = 0;
|
||||
if ((!$this->premode) AND $this->isRTLTextDir()) {
|
||||
$isRTLString = preg_match(TCPDF_FONT_DATA::$uni_RE_PATTERN_RTL, $dom[$key]['value']) || preg_match(TCPDF_FONT_DATA::$uni_RE_PATTERN_ARABIC, $dom[$key]['value']);
|
||||
if ((!$this->premode) AND $this->isRTLTextDir() AND !$isRTLString) {
|
||||
// reverse spaces order
|
||||
$lsp = ''; // left spaces
|
||||
$rsp = ''; // right spaces
|
||||
@ -18343,7 +18344,7 @@ Putting 1 is equivalent to putting 0 and calling Ln() just after. Default value:
|
||||
if ($newline) {
|
||||
if (!$this->premode) {
|
||||
$prelen = strlen($dom[$key]['value']);
|
||||
if ($this->isRTLTextDir()) {
|
||||
if ($this->isRTLTextDir() AND !$isRTLString) {
|
||||
// right trim except non-breaking space
|
||||
$dom[$key]['value'] = $this->stringRightTrim($dom[$key]['value']);
|
||||
} else {
|
||||
|
Loading…
x
Reference in New Issue
Block a user