Parsely / wp-parsely

The official WordPress plugin for Parse.ly - makes it a snap to add the required tracking code to enable Parse.ly on your WordPress site.
https://wordpress.org/plugins/wp-parsely/
GNU General Public License v2.0
63 stars 32 forks source link

Smart Linking should not suggest links inside headings/captions #2669

Closed vaurdan closed 1 month ago

vaurdan commented 1 month ago

Is your feature request related to a problem?

There is the possibility of the API returning suggestions in the headings and captions of the post content. This is not wanted, and therefore the plugin should be able to filter these suggestions and ignore them.

Describe the solution you'd like

When the API returns the suggestions, the suggested links are processed and validated. In this process, it should check if the link is being inserted inside a heading or a caption, and skip/ignore it if so.

Describe alternatives you've considered

Send the post content to the API without any headings or captions. However this could be problematic, since the offset returned by the API might not be consistent with the offset we're expecting to the actual raw post content.