# Escaping the "#" character in search

**URL:** <https://meta.discourse.org/t/escaping-the-character-in-search/67249>\
**Category:** Bug\
**Created:** [Agosto 1, 2017, 2:10pm UTC](https://meta.discourse.org/t/escaping-the-character-in-search/67249 "2017-08-01T14:10:12Z")\
**Posts on this page:** 1\
**Showing post:** 6

<div class="post-metadata">

**Author:** ![sam](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/sam/32/102149_2.png) [@sam](https://meta.discourse.org/u/sam)\
**Post date:** [Agosto 1, 2017, 9:35pm UTC](https://meta.discourse.org/t/escaping-the-character-in-search/67249/6 "2017-08-01T21:35:33Z")

</div>

@tgxworld I would like you to take the “cannotfindthis” problem. This is actually only a problem for our hosting.

Our default PG install returns:

```plaintext
local and image

[1] pry(main)> Post.exec_sql("select to_tsvector('english', '“test”')").to_a
=> [{"to_tsvector"=>"'test':1"}]

Our production pg

[1] pry(main)> Post.exec_sql("select to_tsvector('english', '“test”')").to_a
=> [{"to_tsvector"=>"“test”':1"}]

```

And:

```plaintext
Local + Dev + Image

pry(main)> Post.exec_sql("select ts_debug('english', '“test”')").to_a
=> [{"ts_debug"=>"(blank,\"Space symbols\",“,{},,)"},
 {"ts_debug"=>"(asciiword,\"Word, all ASCII\",test,{english_stem},english_stem,{test})"},
 {"ts_debug"=>"(blank,\"Space symbols\",”,{},,)"}]

PRD

pry(main)> Post.exec_sql("select ts_debug('english', '“test”')").to_a
[{"ts_debug"=>"(word,\"Word, all letters\",“test”,{english_stem},english_stem,{“test”})"}]

```

So there is something about our PG install in our PRD containers that is missing “smart quotes” from the space chars. This is going to cause some severe problems in search quality so we need it fixed asap.

---

_[View the full topic](https://meta.discourse.org/t/escaping-the-character-in-search/67249)._
