Bug using Ctrl+k+d in few places (') replaced with (")
This is right code:
<body id="page" class="page <?php echo $this['config']->get('body_classes'); ?>" data-config='<?php echo $this['config']->get('body_config','{}'); ?>'>
This is invalid code:
<body id="page" class="page <?php echo $this['config']->get('body_classes'); ?>" data-config="<?php echo $this['config']->get('body_config','{}'); ?>">
Find the difference and you will know what i am talking about this is changed when hitting Ctrl+k+d Formatting Code.
We’re looking into this. Thank you.
2 comments
-
Damir Pečnik
commented
I am using the PHP file.
-
Eric Wong (WebMatrix Tester)
commented
Hi Damir,
Are you using an html file or a php file when you are seeing this? I think what is going on is our html parser is seeing the first ' around config as then end of the attribute value and treating it as such (we don't process that <?php is the start of a php region).
Unfortunately, that means we won't be able to fix this. That said, is it possible for you to use the following instead?
<body id="page" class="page <?php echo $this['config']->get('body_classes'); ?>" data-config="<?php echo $this['config']->get('body_config','{}'); ?>" >
by using " instead of ' around your attribute value, we should parse it correctly.
Hope this helps.
Eric