JSFiddle - React, Tailwind, and code Playground

HTML

<h3>
    <a href="/news/here-is-a-url-with-ffi-ligature">Here is a ffi ligature</a>
</h3>


<h3>
    Here is a ffi ligature
</h3>

JavaScript

// ligatures.js
$.fn.ligature = function(str, lig) {
    return this.each(function() {
        this.innerHTML = this.innerHTML.replace(new RegExp(str, 'g'), lig);
    });
};
$('h3 a, h3:not(:has(a))').ligature('ffi', '&#xfb03;').ligature('ffl', '&#xfb04;').ligature('ff', '&#xfb00;').ligature('fi', '&#xfb01;').ligature('fl', '&#xfb02;');