Welcome to the Question2Answer Q&A. There's also a demo if you just want to try it out.
+2 votes
in Q2A Core by

Hi, I have IT base site where user are asking question about programming and windows and they using tags like

  • C++
  • Windows-8.1
  • .net

and so on


The problem is that + or .(dot) is removed when it save the posting.

How can I allow this.

Q2A version: 1.7

2 Answers

0 votes
selected by
Best answer

You will be able to change Q2A default word filter (also tag included) by hacking a line below.

qa-include/util/string.php (L709)


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

Caution !!

Changing of this definition will affect the whole Q2A system not only tag. You can input "+ (plus)" and ". (dot)" sign in tag with this hack. However, there is a possibility of the other problems. You will need to perform the test well.


I will try this on my test server. I will update you of the results
I'm praying for your good fight.
0 votes
One way is to change the option in Admin > Posting, "Use comma as tag separator".

That will allow any character (except commas of course) in tags.

By the way this is something I'm looking at resolving for Q2A 1.8 - ie allowing any characters in tags when using space-separated tags.