2012-12-04, 05:01 PM
I have two issues in adding mycode
Regular Expression:
Replacement
(1) It converted $1 to upper case string
(2) It added extra "<br/>" at the end of the html block.
Is there any danger in that piece of the code without convert $1 to upper case, and without adding extra '<br/>' at the end?
Regular Expression:
\[hide=(.*?)\](.*?)\[/hide\]
Replacement
<dl class="codebox"><dt><a href="javascript:void(0);" onclick="var el = this.parentNode.parentNode.getElementsByTagName('dd')[0]; var v = el.style.display != 'none'; el.style.display = v ? 'none' : 'block'; this.innerHTML = (v ? '[+]' : '[−]') + '$1'; ">[+] $1</a></dt><dd style="display: none;">$2</dd></dl>
(1) It converted $1 to upper case string
(2) It added extra "<br/>" at the end of the html block.
Is there any danger in that piece of the code without convert $1 to upper case, and without adding extra '<br/>' at the end?