I have a question about a WordPress URL in Google Chrome 94.0.4606.81:
I was reading a WordPress article recently and noticed that there is an  (OBJ) symbol in the URL. The symbol is also in the webpage title.
Take Ownership and Select Owner
Question:
What is the purpose of the  (OBJ) symbol — and how is it possible that it has been included in a URL?
4
Answers
It seems like you got this symbol in the title field of the article. You can remove it from there. If you don’t see it select everything in the field with ctrl + a and write the title new.
Honestly, I don’t know what nature is this copy/paste issue in WP, and the "Object Replacement Character"
To avoid appearing this character it’s enough to use
Ctrl+Shift+V
shortcut while pasting into WP post title field, means: Paste Text Without Formatting.If you want to be sure in protecting the post slug (means: post URL) you can use the snippet in your functions.php:
preg_replace
function searches here for string "%ef%bf%bc" or "efbfbc" (UTF-8 – hex encoded OBJ character) OR any character that IS NOT base alphanumeric character or dash character – to delete.Since you’ve mentioned it also made into the title: I use this to filter the title on save to remove these special characters.
Please note that you may need to extend set of allowed UTF range in the
preg_replace
call based on the languages you support. The range in the example should suit most languages actively used in the word, but if you may write article titles that include archaic scripts like Linear-B, gothic etc. you may need to extend the ranges.If you copy-pasted it from somewhere, like I did, remember to paste as text using
Ctrl + Shift + V
to avoid this.Also, it is the case that this
[OBJ]
only appears in Chromium-based browsers like Chrome, Edge etc, unlike in Firefox which I believe discards it by default.