-
Notifications
You must be signed in to change notification settings - Fork 27
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Date format string strips escape characters? #163
Comments
Simple test program: $xml = '<div class="created">--</div>';
$tss = '.created {
content: data(create_time);
format: date "jS M Y \a\t h:s a";
}';
$data['create_time'] = '2017-06-08 22:30:51.509626';
$tpl = new Transphporm\Builder($xml, $tss);
echo $tpl->output($data)->body; |
Have you tried doubling the backslashes? I don't know for sure if it would work, but it's worth a try. |
Yes, tried that, with same result. |
Try using 4 if you are using a PHP string |
Use 2 if it's from a file |
My actual use case is all from XML and TSS files. Using 2 fails from files. Using 4 fails from a PHP string. |
This issue should be fixed now |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I'm trying to format my date-time string using the localization date string, as described here in the wiki. But the TSS processing seems to strip the backslashes out before the PHP
date()
or equivalent command is called to format the string. Here's my TSS:Expected output:
30th May 2017 at 10:52 am
Actual output:
30th May 2017 am31 10:52 am
The text was updated successfully, but these errors were encountered: