Viewing 4 replies - 1 through 4 (of 4 total)
  • Thread Starter Gilligan

    (@playgod)

    Update: This is related to the Jetpack Settings: Writing: Media: Display images in a full-screen carousel gallery.

    If that setting is turned off, highlights do not break image tags.

    Is there any way to limit or prevent highlights in image tags or img src? It seems to be more of a bug with Relevanssi than Jetpack and RICG srcset.

    I tested Jetpack on a private server in offline mode, which bypasses the wp.io CDN and other phone-home or external connection features. If the carousel gallery feature is turned on, the image tag bug appears.

    • This reply was modified 2 years, 3 months ago by Gilligan.
    Plugin Author Mikko Saari

    (@msaari)

    The problem is the HTML tags inside the image caption. Relevanssi has a mechanism for removing the extra highlights from inside HTML tags. The way this particular image element is constructed with HTML tags inside the caption throws the algorithm off the rails. Relevanssi runs html_entity_decode() on the post content, but shouldn’t run it for the entities inside HTML tag attributes.

    I’ll have to investigate this to see if I can figure out a reasonable solution. Meanwhile, I would recommend turning the in-document highlighting off; it’s a bit of a shaky feature in the best case.

    Plugin Author Mikko Saari

    (@msaari)

    Ok, I found a solution. The next version of Relevanssi – I’m hoping to release it next week – will not convert entities inside data attributes. That should fix this problem.

    Thread Starter Gilligan

    (@playgod)

    Thank you so much, Mikko!

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Search highlights breaking Jetpack wp.io img src attribute’ is closed to new replies.