Forum


Replies: 3   Views: 3122
Adding multi-line text
Topic closed:
Please note this is an old forum thread. Information in this post may be out-to-date and/or erroneous.
Every phpdocx version includes new features and improvements. Previously unsupported features may have been added to newer releases, or past issues may have been corrected.
We encourage you to download the current phpdocx version and check the Documentation available.

Posted by AquaSapphire  · 19-12-2012 - 09:18

Hello,

We have problems with adding multi-line text if template variable contains some special symbols( EX: '(',')','.','['.']' ).

Problem in CreateTemplate.inc line 1400
[code]self::$_document = preg_replace(
'/\\' . self::$_templateSymbol . $args[0]
. '\\' . self::$_templateSymbol . '/',
$values,
self::$_document,
1
);[/code]
So if $arg[0] contain "special" symbols it doesn't work. It should be something like this
[code]self::$_document = preg_replace(
'/\\' . self::$_templateSymbol . str_replace(array('(',')','[',']','.'), array('\\(','\\)','\\[','\\]','\\.'), $args[0])
. '\\' . self::$_templateSymbol . '/',
$values,
self::$_document,
1
);[/code]
Could you fix it?

Posted by admin  · 11-04-2013 - 12:13

Hello,

We'll check that issue to be solved ASAP.

Regards.

Posted by AquaSapphire  · 11-04-2013 - 12:13

thanks