Extension talk:ProtectSection

Problem: tags are visible in text
The code seems to work, but the and tags are visible in the text, which severely limits the extension's usefulness. Anybody know how to tweak it so that the tags aren't visible?
 * Ther's no . If you are using it, the tags will just be shown as text. -- Duesentrieb ⇌ 13:15, 29 April 2007 (UTC)


 * I mistyped in the original message - the and  tags are visible in the text. -- Dctoedt 15:49, 29 April 2007 (UTC)


 * I had the same problem and this does the job for me   - as long as nobody deletes part of the comment tags. Deleting --> from  can probably comment out the rest of the page...haven't tried though.
 * Another alternative is to make a class and make a span with white text. But these are all workarounds...maybe a developer can easily filter you the tags before rendering?
 * The code for that already exists in the tweaked version on the page. But the issue is that the html entities are what is in the text, not the that you see. The code needs to be copied from the edit view, not from a simple copy or else the stripping of the tags won't work. Dantman
 * I just changed the pre to source in the page, so you can copy the code fine now from the page because source escapes those HTML entities so you can copy the correct source. Dantman 14:19, 12 July 2007 (UTC)
 * I added the protect tag to Sanitizer.php and that fixed it for me - RichyL
 * For the record, in my installation the tags only show for users who have the 'protectsection' right. Users who can't edit protected sections don't see them. I guess this is a feature so that admin can easily tell what is protected and what is not while browsing - I haven't found it in the code yet but I would request from the developer that this feature be a toggle-able option within protectsection.php - it breaks a lot of my formatting when I'm using my admin account. - Austin 10:16 8 May 2012


 * Just edit and save the page again, the shown code will disappear! - Guest, 12 may 2014

Problem with mediawiki 1.12
It seems that message file cause error on mediawiki 1.12 (see this thread). Could author of this extension make the update for us ? -- phkoech 26 april 2008
 * It worked for me. Dagoth Ur, Mad God 02:25, 10 August 2008 (UTC)

Does ProtectSection need the security disclaimer?
Does this extension need the security disclaimer at the top of the page? It seems unlikely that any of the issues described on Security issues with authorization extensions apply?

Tnabtaf 21:22, 16 May 2008 (UTC)


 * The security provided by the extension is imperfect. Even though I've tried to fix several loopholes with the extension, I still wouldn't claim that it would meet the security requirements of someone who wants 100% guaranteed security.  So the core of the message still seems relevant. --Nephele 05:08, 30 August 2009 (UTC)

Tcrimsonk (talk) 00:03, 1 June 2016 (UTC)
 * The security warning indicates that security concerns could lead to "exposure of confidential data" however this extension does not protect the confidentiality of data, it simply protects the integrity of the data. Seems that the warning should be changed accordingly, or removed.

Possible loophole
What is there to stop someone commenting out the tags and the text between them, then adding their version? Phantom Hoover 17:49, 7 March 2009 (UTC)
 * If the new version of the protected text was identical to the commented-out version, then, yes, the edit would be accepted (and the protection isn't really being circumvented: the protected text still appears unaltered on the article). But otherwise the contents of the new section would not match the old section: the edit would be recognized as a modification and blocked.  --Nephele 05:08, 30 August 2009 (UTC)

Extension download not working
Dear all, when attempting to download the extension with the extension distributor it is not available. Could you again add it? thanks! --Stoettner (talk) 10:48, 8 July 2012 (UTC)

Does not work with Semantic Forms
Editing btw two protect sections in the free text area of a form does not work. Is this known about or is there a workaround or fix? I'm using MW 1.20.2 and ProtectSection 1.1. 97.122.215.19 16:23, 9 January 2013 (UTC)

HELP needed: problems with installation
I installed ProtectSection (downloaded the 3 files and added them via FTP to extension file); than I added require_once( "$IP/extensions/ProtectSection/ProtectSection.php") to localsettings; reloading my Wiki there are a list with the capital: "log of/trunk/extensions/protectSection/protectSection.php"; below is the than the normal content of the wiki. What do I have to do? Using mediawiki 1.23.1

Extension Status?
This extension is listed as unmaintained, but the discussion and latest version are both more recent than either of the extensions listed as alternatives. (Though both of those are currently listed as "beta" status rather than "unmaintained." Is there an actual current alternative to this functionality?  Is anyone having any luck running this extension in a recent release of MediaWiki? 23:56, 1 May 2016 (UTC)

Incompatibility with edit API
I am using the edit API via the Perl module. When it submits a change, it add a carriage return (\r) at the end of each line. This causes changes to articles with multiple line sections to fail because lines in the protected sections appeared to differ because of the \r. This one line addition to ProtectSection_body.php fixes the problem:

--- 97,99        else for ( $i=0 ; $i < count( $list1 ); $i++ ) { +              $list2[$i][0] = str_replace("\r", '', $list2[$i][0]); if( $list1[$i][0] != $list2[$i][0]) {