Thanks for looking - looks like it just required a little tinkering with phpmyadmin.
At least the question is now answered for anyone else that has the problem!
ERROR: Unknown Punctuation String @ 363
STR: =<
SQL: INSERT INTO xoops_tplsource VALUES (36, '<table class="outer" width=\'100%\' cellspacing=\'0\'>\n <tr>\n <td class="head" colspan=\'2\' align=\'left\' height="18"><{$lang_category}> <{$link.category}></td>\n </tr>\n <tr>\n <td class="even" width=\'60%\' align=\'left\' valign="bottom"><a href="\?PHPSESSID=*snip!*"'visit.php?cid=<{$link.cid}>&lid=<{$link.id}>\'
#1064 - You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near 'visit.php?cid=<{$link.cid}>&' at line 1