If it's <script src="/script/jquery.autocomplete.js" type="text/javascript">
,should call htmlspecialchars
.
If it's <pre><code><script src="/script/jquery.autocomplete.js" type="text/javascript"></code></pre>
,should leave it as is.
How to do this kind of task?
EDIT
Think you are using wmd editor like SO,and you included some code but didn't format it,in this case it should be processed by htmlspecialchars,but if you formatted it as "Code Sample",there is no need to process