Question: When trying to fix an error in the code example of an old question for posterity, the editor will not let me save the change because the `'Body cannot contain "http://tinyurl.com/api"`. The TinyURL string is being used in a code example and it not actually linking to content outside of StackOverflow.

Although I imagine this is a very small corner case, would it be worthwhile to ignore URL shorteners that are in code examples?

My question for reference: [Generate TinyURL with client side javascript--need CORS workaround](https://stackoverflow.com/questions/35544698/generate-tinyurl-with-client-side-javascript-need-cors-workaround)

[![Screenshot of editor error](https://i.stack.imgur.com/zTDbU.png)](https://i.stack.imgur.com/zTDbU.png)

Answer: 
As a workaround you should be able to use a `<pre></pre>` block instead of the usual 4 space indent and then break up the URL with an HTML comment. Something like:

```
<pre>
var tinyAPI = 'http://tiny<!---->url.com/api-create.php?url=';
</pre>

```

Which would end up looking like this:

```

var tinyAPI = 'http://tinyurl.com/api-create.php?url=';

```
Yes, legitimate cases of link shorteners were something that I ran into quite a lot while I was [Removing link shorteners from posts!](https://meta.stackoverflow.com/questions/321494/removing-link-shorteners-from-posts)

Obviously, I never finished that project (there's just too much for me alone, especially once you consider dead links).

I found a few ways to bypass the filter, but it comes at the expense of the clarity of the post. Within code, the best method is to change (for example):

```
"http://ppcg.ga/1234"

```

to

```
"http://" + "ppcg.ga/1234"

```

---

Ideally, the questions tagged [url-shortener](https://stackoverflow.com/questions/tagged/url-shortener "show questions tagged 'url-shortener'") (and their answers) should be exempt from the ban. (This solution opens up different paths for abuse, of course. But it might be worthwhile to request.)