Skip to content
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

XSlate eats some text when in a macro #123

Open
pleblancq opened this issue May 30, 2014 · 2 comments
Open

XSlate eats some text when in a macro #123

pleblancq opened this issue May 30, 2014 · 2 comments
Labels

Comments

@pleblancq
Copy link

ex:

: macro ly_header_test -> {
    <p><: $lg.header_test :></p>
    <script>
        $('#test img').attr('src','<: $url_microsite :>images/logo_test<: $fm.lg :>.gif');
    </script>
:}

for the first few runs, 'src', will be chopped off. if you refresh the page after a couple of time, everything is fine. So if the webpage outputs language other than english (french in my case), all the accentued characters will be in the wrong encoding.

but if you change the macro to look like this, it will work.

: macro ly_header_test -> {
    <script>
        $('#test img').attr('src','<: $url_microsite :>images/logo_test<: $fm.lg :>.gif');
    </script>
    <p><: $lg.header_test :></p>
:}
@gfx gfx added the bug label May 30, 2014
@gfx
Copy link
Member

gfx commented May 30, 2014

Thanks to the report. Can you make a test case for it?

@pleblancq
Copy link
Author

I'll gladly do one when things calm down at job !
By the way, it happens only when there's utf8 characters.
The development machine also uses an old perl version (5.8.8) which I believe is not utf8 friendly.

I know that Xslate is expecting to receive utf8 only, but what happen if encoding gets mixed up ? Could it be problematic ? I'm really short of time right now to go deep in Xslate guts.

Thanks for answering.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants