You just need to call your template, for example
<xsl:variable name="$result">
<xsl:call-template name="common_js_escape">
<xsl:with-param name="text" select="description"/>
</xsl:call-template>
</xsl:variable>
<xsl:value-of select="$result"/>
will output the value "description" after doing the relevant substitutions.
(In fact, you only need the variable if you are doing something with the result other than xsl:value-of. If you do the call-template without a variable, the result will simply be written to the result tree.)
It's a lot easier in XSLT 2.0 which has a replace() function.
Michael Kay
http://www.saxonica.com/
Author, XSLT Programmer's Reference and XPath 2.0 Programmer's Reference