# Intra-post anchor links don't work in Safari / Firefox

**URL:** <https://meta.discourse.org/t/intra-post-anchor-links-dont-work-in-safari-firefox/29125>\
**Category:** Bug\
**Tags:** ember\
**Created:** [22. Mai 2015 um 13:19 UTC](https://meta.discourse.org/t/intra-post-anchor-links-dont-work-in-safari-firefox/29125 "2015-05-22T13:19:17Z")\
**Posts on this page:** 1\
**Showing post:** 1

<div class="post-metadata">

**Author:** ![plkap74](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/plkap74/32/116106_2.png) [@plkap74](https://meta.discourse.org/u/plkap74)\
**Post date:** [22. Mai 2015 um 13:19 UTC](https://meta.discourse.org/t/intra-post-anchor-links-dont-work-in-safari-firefox/29125/1 "2015-05-22T13:19:17Z")

</div>

I’ve been experimenting with anchor links inside of posts (links to content inside of a long post). I have read that you can’t use the `id`s because they get stripped. I used the `name` property instead and it works for Chrome but throws a very cryptic error in Safari.

```plaintext
Error: Syntax error, unrecognized expression: [name=anchor-name

```

It doesn’t give a useful trace so I can’t even tell where it is coming from. Is the anchor routing dealt with by Ember? Is there custom logic for that somewhere?

* * *

## Example 1 (Live bug)

Try going to this link in Chrome (it works) but in Safari it throws an error and doesn’t work:

> **[Guidelines - Discourse Demo](https://try.discourse.org/guidelines)**
>
> Demonstration sandbox for Discourse

* * *

## Example 2 (Reproduced bug)

works in Chrome, throws errors in safari

### Table of contents

- [Topic 1](#topic-1)
- [Topic 2](#topic-2)
- [TOC markup](#toc-markup)

#### Topic 1

The markup for this heading is:

```plaintext
#### <a name="topic-1">Topic 1</a>

```

#### Topic 2

The markup for this heading is:

```plaintext
#### <a name="topic-2">Topic 2</a>

```

#### TOC Markup

The markup for the table of contents is

```plaintext
### Table of contents
- <a href="#topic-1">Topic 1</a>
- <a href="#topic-2">Topic 2</a>
- <a href="#toc-markup">TOC markup</a>

```

---

_[View the full topic](https://meta.discourse.org/t/intra-post-anchor-links-dont-work-in-safari-firefox/29125)._
