background-image:url("https

Forums Bug Reports background-image:url("https

  • This topic is empty.
Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • marrco
    Member
    Valued

    on a CONTAINER / Style Attribute / Bg Image entering https://source.unsplash.com/fwWj5Y1IgQg gives :

    <div class="container-fluid d-flex" style="height:100vh;padding:0;background-color:#dcb4b4;background-position:center;background-size:cover;background-image:url(&quot;https://source.unsplash.com/fwWj5Y1IgQg&quot;);">
    

    while is correct to automatically surround the url in single quotes (i just entered the url, with no quotes at all), it wrongly appears in the resulting html source as the entity &quot;

    marrco
    Member
    Valued
    marrco
    Member
    Valued

    still not fixed in 4.1.2
    Bg Image when set as http://&#8230;. gets wrongly exported into url("http://&#8230;.

    Martin Angelov
    Bootstrap Studio Developer

    I think that Bootstrap Studio does the right thing here – the image url()s are surrounded with quotes for consistency. When a string is a part of an HTML attribute (like the contents of style), all quotes must be escaped. Browsers handle this case perfectly well as far as I know. Has this caused issues in your designs?

    Loahrs
    Member

    I know this is a quiet old issue here, but still I want to reply to it. I am currently facing the same problem:

    BS Studio exports my HTML files like this, when setting the background-image or by just using the Parallax Background Element provided by BS Studio:

    <div class="container-fluid" style="background-image: url("assets/img/PicsArt_08-21-07.04.00.jpg");background-size: cover;background-repeat: no-repeat;height: 500px;"></div>
    

    This causes the Design to look completely destroyed in Firefox 71.0. (I am using it together with the Coast CMS Content Management System). When manually replacing all ” by ” ” as in:

    <div class="container-fluid" style="background-image: url('assets/img/PicsArt_08-21-07.04.00.jpg');background-size: cover;background-repeat: no-repeat;height: 500px;"></div>
    

    it’s displayed as it should.

    As a workaround I went through all my BS Studio Designs Style Sheets and replaced all

    background-image: url("image.jpg");
    

    with:

    background-image: url('image.jpg');
    
    Martin Angelov
    Bootstrap Studio Developer

    Sorry for the late response. When Bootstrap Studio exports your design, the double quotes around the url are encoded to &amp;quot;. What you describe shouldn’t happen. Can you send us a bsdesign file that generates an HTML like that so we can take a look? You can see our email address here: https://bootstrapstudio.io/contact-us

Viewing 6 posts - 1 through 6 (of 6 total)
  • You must be logged in to reply to this topic.