craftcms / cms

Build bespoke content experiences with Craft.
https://craftcms.com
Other
3.21k stars 624 forks source link

Rich Text fields not converting URLs to ref tags on save #1645

Closed brandonkelly closed 7 years ago

brandonkelly commented 7 years ago

Description

If you link to an entry/category, or load an image in a Rich Text field, the URL is supposed to get converted to a reference tag on save, but that isn’t happening; the URL is just getting stored directly into the DB, including the ref tag URL fragment at the end:

<p><a href="http://craft3.dev/news/the-future-of-augmented-reality#craft\elements\Entry:24">The Future of Augmented Reality</a></p>

Looks like this is because the full element type class names are getting added, rather than their ref handles, so it’s not matching the ref tag regex.

Additional info

narration-sd commented 7 years ago

Great to see you finding these and chunking them out, Brandon.