tactivos / grunt-cdn

79 stars 53 forks source link

img src url is replaced twice when img is wrapped inside a element #42

Closed pwalczyszyn closed 10 years ago

pwalczyszyn commented 10 years ago

I have an issue that when my img elements are wrapped inside of an a elements:

<a href="/">
  <img src="img/logo.png">
</a>

The result is following when trying to add absolute path e.g. /absolute/path/:

<a href="/">
  <img src="/absolute/path/absolute/path/img/logo.png">
</a>
pwalczyszyn commented 10 years ago

Sorry I think I was wrong, this is also happening to some img's not wrapped in A element. What I seen in the console when task is running is this:

<img src="img/logo.png">

this is what I see in the console:

Changing /img/logo.png -> /absolute/path/img/logo.png

and few lines later I see this:

Changing //absolute/path/img/logo.png -> /absolute/path/absolute/path/img/logo.png

The strange thing about it that it happens only two some not all img elements in my html file. I didn't figure out yet what is the rule here.