Note that there are some explanatory texts on larger screens.

plurals
  1. POHow do I manipulate the output of a PHP script when it is already manipulated by another (plug-in) script?
    primarykey
    data
    text
    <p>I take it you are confused. So am I, but I'll try to formulate this as well as I can.</p> <p>The content management system I use has a third-party plug-in installed that manipulates the output of the pages produced by the CMS. That's what it's supposed to do, and that's why I installed it, but there's one small part of those manipulations that I need to get rid of.</p> <p>The plug-in looks for the <code>&lt;/title&gt;</code> tag in the HTML output and then adds an unwanted tag right after it (by replacing <code>&lt;/title&gt;</code> with <code>&lt;/title&gt;&lt;unwanted tag&gt;</code>).</p> <p>You might think, why not just dig into the plug-in source and comment out that particular function? Well, that's the kicker: the plug-in is encoded with Zend Guard, so I can't make heads nor tails of its source, and unfortunately the developer is not willing to assist.</p> <p>One other manipulation that I <em>was</em> able to get rid of by myself, was the extra (and again unwanted) HTTP header it set for every page.</p> <p>The Zend-encoded PHP file is loaded by a regular PHP file, and I was able to unset the above mentioned header by adding the following bit of code to the very bottom of this 'load file', before <code>?&gt;</code>:</p> <p><code>header_remove("X-Enhanced-By");</code></p> <p>It works splendidly, but that was about as far as my experience and research could take me.</p> <p>The last thing, then, that I need to undo, is the manipulation of the title tag. I temporarily worked around it by changing all my <code>&lt;/title&gt;</code> tags to <code>&lt;/title &gt;</code>, but that seems hardly a proper workaround.</p> <p>If I can unset the header by placing <code>header_remove("X-Enhanced-By");</code> right before <code>?&gt;</code>, does that mean I can also use that same area to undo the addition of the unwanted tag after <code>&lt;/title&gt;</code>?</p> <p>Let's assume the plug-in replaces <code>&lt;/title&gt;</code> with <code>&lt;/title&gt;&lt;base href="http://www.example.com/" /&gt;</code> on every page that is put out by the CMS.</p> <p>How would I go about undoing that?</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload