Tridion Stack Exchange is a question and answer site for Tridion developers and administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

We're using the extension from SDLTridionWorld to process download links, We found an issue with the extension where the first anchor in the rendered output is not processed.

We have enabled viewing the debug log and ran the TBB in TemplateBuilder. The extension's log states that it is found, but isn't replaced. We've also tried running it against different PDFs, but the issue persists. What could be the cause?

share|improve this question
up vote 5 down vote accepted

I took a look at the markup for the component being tested on. The markup looks as follows:

  <a tridion:href="tcm:44-32740">Test Hyperlink</a>

Looking at the ProcessDownloadLinksInOutput.cs, the regex expression matching anchor tags is incorrectly identifying the article tag as an anchor tag.


The regex is searching for any tags beginning with an anchor 'a', followed by a repeatable sequence of a whitespace non-whitespace characters. Replacing the regex with the following will fix the problem (match any tags opening with 'a' with an immediately following space):

share|improve this answer
Thanks for catching this! I will update the extension code as soon as I can. As mentioned in the article the extension was not tested in production, so I am glad that people use it and that we can improve it to make it more production ready. – Philippe Conil Dec 17 '13 at 18:47
A very useful extension indeed! Thanks for sharing it @PhilippeConil. – Nickoli Roussakov Dec 17 '13 at 20:49

This is a community tool, so it perhaps hasn't gone through the sort of testing you'd expect for a production ready release, I'd run through the code through a debugger to check:

  • If the regex used is correctly grabbing all the links
  • If your links contain anything strange that's stopping the regex from working
  • If the code to loop through all the items in the regex match is ignoring a link for a particular reason, could it me that one of the items isn't published?
share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.