I have a problem with OJS Keywords when I write Plus sign (+) on a keyword it saves space (-) saved without problem only (+) not saved for example:
Combined the (1+3)
it saves as
Combined the (1 3)
when going to the database and adding (+) on a keyword it works fine
but if I save the metadata of an article or publish the article it saves space not (+)
Application Version - OJS 3.3.0.8
Server Information
PHP version 7.4
Apache version LiteSpeed
Database driver mysqli
Database server version 10.4.19-MariaDB-cll-lve
This is happening because the API treats incoming data as being URL-encoded. Before the keyword is stored in the database, the data is passed into PHP’s urldecode function which turns the URL-encoded “+” into a space.
For reference, this happens here in the code:
To have a plus sign be correctly saved, it must first be URL-encoded, which in this case is %2b. So to have 1+3 saved in the database and correctly decoded, it would need to be written as 1%2b3.