Welcome to the Question2Answer Q&A. There's also a demo if you just want to try it out.
+2 votes
466 views
in Q2A Core by
Some of my users want to use tags which include "+" symbol in it just like C++ in stackoverflow. But "+" is removed as we hit ask the question button.

Is there a way to accomplish this?
Q2A version: 1.7

1 Answer

0 votes
by

Probably, qa-include/util/string.php (around L709)

//@define('QA_PREG_INDEX_WORD_SEPARATOR', '[\n\r\t\ \!\"\\\'\(\)\*\+\,\.\/\:\;\<\=\>\?\[\\\\\]\^\`\{\|\}\~]');
@define('QA_PREG_INDEX_WORD_SEPARATOR', '[\n\r\t\ \!\"\\\'\(\)\*\,\.\/\:\;\<\=\>\?\[\\\\\]\^\`\{\|\}\~]');

//@define('QA_PREG_BLOCK_WORD_SEPARATOR', '[\n\r\t\ \!\"\\\'\(\)\+\,\.\/\:\;\<\=\>\?\[\\\\\]\^\`\{\|\}\~\$\&\-\_\#\%\@]');
@define('QA_PREG_BLOCK_WORD_SEPARATOR', '[\n\r\t\ \!\"\\\'\(\)\,\.\/\:\;\<\=\>\?\[\\\\\]\^\`\{\|\}\~\$\&\-\_\#\%\@]');

This hack will affect the whole system. Therefore, you need to apply this hack at your own risk. And, you need to be fully tested in the local environment.

by
Thanks for your answer @Sama55. I haven't tested this but if this is possible with a core hack then shouldn't this hack be introduced as a pull request in Q2A github?
by
You don't need to edit the core. You should copy those define lines to your qa-config and edit them to your liking.
...