Fast reply post won't parse the javascript in a custom bbcode
Submitted Michael, Jun 25 2012 06:35 PM | Last updated Sep 27 2012 10:27 AM
See this post: http://community.inv...t/#entry2280936
This is a custom bbcode which simply swaps out a simple bbcode for a javascript line. When you do this with a fast reply, that resulting javascript doesn't show up. When you refresh the page, it does.
This is a custom bbcode which simply swaps out a simple bbcode for a javascript line. When you do this with a fast reply, that resulting javascript doesn't show up. When you refresh the page, it does.
| Status: | Not a Bug |
| Version: | 0 |
| Fixed In: | 0 |











12 Comments
This is also the reason we converted the spoiler bbcode to use a CSS class to attach a javascript event from ipb.js.
There is nothing to fix here, this is not a bug. It should not be possible to post javascript in bbcodes as Terabyte mentioned.
[ quote name='AndyMillne' timestamp='1344979896' collapse='1' ] There is nothing to fix here, this is not a bug. It should not be possible to post javascript in bbcodes as Terabyte mentioned. [ / quote ] <p onclick="if($('emailquote-244408').style.display=='none'){$('emailquote-244408').style.display='inline';$('quotehelp-244408').style.display='inline';}else{$('emailquote-244408').style.display='none';}" class="citation">AndyMillne, on 14 August 2012 - 03:31 PM, said:</p>What I ended up doing was:
It's a bit of a roundabout method, but it is working correctly whether posts are cached or not.
Updating Status to: Not a Bug
Updating Version to: 0
I'm reverting this because it's the collapse="1" thing in quotes which Nexus uses.
There's nothing wrong with using Javascript in custom BBCode (and I've removed the message saying you can't) but as for the original issue being reported - if you inject a <script> tag into the DOM using AJAX (which is how fast reply works), it won't work - there's nothing we can do to fix that. So the original issue is Not A Bug.