# Automatic encoding of parsed URL params

**URL:** https://meta.discourse.org/t/automatic-encoding-of-parsed-url-params/67232
**Category:** Development
**Created:** [2017 年 8 月 1 日午前 9:53 UTC](https://meta.discourse.org/t/automatic-encoding-of-parsed-url-params/67232 "2017-08-01T09:53:48Z")
**Posts on this page:** 1
**Showing post:** 13

<div class="post-metadata">

### Author: ![david](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/david/32/157490_2.png) [@david](https://meta.discourse.org/u/david)
#### Post date: [2017 年 8 月 6 日午後 12:25 UTC](https://meta.discourse.org/t/automatic-encoding-of-parsed-url-params/67232/13 "2017-08-06T12:25:10Z")

</div>

Does editing the title on old topics fix the problem?

If so, something like this might work on the rails console:

```plaintext
Topic.all.each do |topic|
    topic.title = topic.title
    topic.save!
end

```

(Assigning topic.title re-generates the slug)

Please please please take a backup before trying that, as I don’t know if it will have any unintended side effects.

It might also take a long time to run depending how many topics you have…

---

_[View the full topic](https://meta.discourse.org/t/automatic-encoding-of-parsed-url-params/67232)._
