• Welcome to Sitemap Generator Forum.
 

URL's of anchor links in attribute strings added to sitemap

Started by mfishe, May 11, 2019, 12:47:57 PM

Previous topic - Next topic

mfishe

Hello,

I am using a jQuery plugin for slideshows. This requires having a template url in a data attribute, like the following:


<div data-template="<a href=galleries/{{slug}}"></div>


This puts /galleries/{{slug}} in my sitemap. I could add {{slug}} to my list of excludes, but I feel like I shouldn't need to maintain a list of excludes to deal with this. I feel like hrefs of anchors stored in strings like this, and which aren't part of the DOM, should be excluded. Is there a reason for this?

As an aside, do regexes work (i.e. could I do add "\{\{[^\{]+\}\}" to my list of excludes to cope with more instances of this type of scenario?

EDIT: This problem did not occur on production, although the same data-template attribute is present. Sorry, it did. I was mistaken.