Skip to main content
alexk64105558
Participant
December 23, 2017
Question

Prevent DW from adding spaces in php snippet

  • December 23, 2017
  • 1 reply
  • 279 views

For some reason DW 2017, ads spaces around double quotes:

Before Applying Source Code Format:

<a href="<?php echo Url("blog/");?>" class="text"> Blog</a>

and  after:

<a href="<?php echo Url(" blog/ ");?>" class="text">Blog</a>

notice the extra white space within url function.

    This topic has been closed for replies.

    1 reply

    B i r n o u
    Legend
    December 23, 2017

    yes it's a kind of bug... but it is because the core hosting format is HTML... and you have 'sort' of nested double quoted (path string inside the attribute value)... replace the URL quoting by a simple quote, and that wont generate extra space

    <a href="<?php echo Url('blog/');?>" class="text"> Blog</a>