Please upgrade here. These earlier versions are no longer being updated and have security issues.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.
Setting NBBC config
jamesinc
✭✭
Hi all,
I use BBCode on my forums, and although NBBC supports stripping leading and trailing whitespace, it isn't enabled. So I wrote a very simple plugin to accomplish the task.
However, I now wonder if maybe it was configurable some other way and I've tried to be too clever about it?
I put the plugin online anyway: https://open.vanillaforums.com/addon/nbbcwhitespacetrim-plugin-1.0.0
0
Comments
There is no better way. In the
__construct
method, the two protected properties are initialized like that:which means that by default there should be no trimming.
Both properties can be changed with
setPreTrim
andsetPostTrim
and those setters are never used.=> there is no other way than using some hook and the methods all by yourself like you did in your plugin.