Obliterate (remove branding) exact HTML snippet from website NOT using javascript or CSS

331 views Asked by At

The exact snippet, generated by software that must be removed is:

<p style="text-align:center;">Created by <a href="http://www.fancywebsite.com" target="_blank">FancyWebsite</a></p>

Perhaps PHP str_replace() or PHP trim() might work. I found these W3 and stack examples but crash and burned after 30 minutes. Maybe regex can find occurrence and replace with &nbsp;?


If browser has J$ disabled, than visitor will see branding. This javascript snippet will not suffice, because user can "view source" and explore:

<script type="text/javascript">
$("p").each(function() {
if ($(this).html().indexOf("Created by") != -1) {
    $(this).remove();
}
});
</script>

Wishing you good health, wealth and wisdom in 2017 - happy new year from me to you! GLHF

1

There are 1 answers

2
AudioBubble On

with just a minor change apply this code.

$("p").each(function() {
if ($(this).html().indexOf("Created by") !== -1) {
    $(this).remove();
}
});

And let me know if any thing else needed. Thanks