This is an edge case where the latex processor of the classical notebook stumbles over the dollar signs:
<a href="http://abc" class="foo-$">test $</a>
a workaround is
<a href="http://abc" class="foo-$">test \$</a>
And yes, I know, it's a bit contrived, but this is still not the expected behavior.
downstream ticket: sagemathinc/cocalc#2853
