Skip to content

Commit

Permalink
Item12947: Remove deprecated AllowInlineScript
Browse files Browse the repository at this point in the history
This was deprecated in Foswiki 1.1.

git-svn-id: http://svn.foswiki.org/trunk@17781 0b4bb1d4-4e5a-0410-9cc4-b2b747904278
  • Loading branch information
GeorgeClark authored and GeorgeClark committed Jun 23, 2014
1 parent 2fec412 commit 6532cf9
Show file tree
Hide file tree
Showing 6 changed files with 9 additions and 132 deletions.
7 changes: 7 additions & 0 deletions UnitTestContrib/test/unit/FormattingTests.pm
Original file line number Diff line number Diff line change
Expand Up @@ -197,6 +197,13 @@ sub skip {
'Post-Foswiki 1.1.x TML syntax',
}
},
{
condition => { with_dep => 'Foswiki,>=,1.1_9999' },
tests => {
'FormattingTests::test_Item3431a' =>
'AllowInlineScript dropped from Foswiki 1.2',
}
},
{
condition => { without_dep => 'Class::Unload' },
tests => {
Expand Down
8 changes: 0 additions & 8 deletions core/lib/Foswiki.spec
Original file line number Diff line number Diff line change
Expand Up @@ -867,7 +867,6 @@ $Foswiki::cfg{AccessibleCFG} = [
'{Register}{NeedApproval}',
'{Register}{Approvers}',
'{Register}{RegistrationAgentWikiName}',
'{AllowInlineScript}',
'{DenyDotDotInclude}',
'{UploadFilter}',
'{NameFilter}',
Expand Down Expand Up @@ -927,13 +926,6 @@ $Foswiki::cfg{AccessibleCFG} = [
# external webpages (see Proxies).
$Foswiki::cfg{INCLUDE}{AllowURLs} = $FALSE;
# **BOOLEAN**
# Used to disallow the use of SCRIPT and LITERAL tags in topics by removing
# them from the body of topics during rendering.
# <font color="red">This setting is fundamentally unsafe and is now
# DEPRECATED</font> - use <a href="http://foswiki.org/Extensions/SafeWikiPlugin">SafeWikiPlugin</a> instead.
$Foswiki::cfg{AllowInlineScript} = $TRUE;
# **BOOLEAN EXPERT**
# If a login name (or an internal user id) cannot be mapped to a wikiname,
# then the user is unknown. By default the user will be displayed using
Expand Down
52 changes: 0 additions & 52 deletions core/lib/Foswiki/Configure/Checkers/AllowInlineScript.pm

This file was deleted.

51 changes: 0 additions & 51 deletions core/lib/Foswiki/Configure/Checkers/Validation/Method.pm

This file was deleted.

2 changes: 0 additions & 2 deletions core/lib/Foswiki/Contrib/core/MANIFEST
Original file line number Diff line number Diff line change
Expand Up @@ -428,7 +428,6 @@ lib/Foswiki/Configure/CGI.pm 0444
lib/Foswiki/Configure/LOGVIEWER.pm 0444
lib/Foswiki/Configure/Checker.pm 0444
lib/Foswiki/Configure/Checkers/AccessibleENV.pm 0444
lib/Foswiki/Configure/Checkers/AllowInlineScript.pm 0444
lib/Foswiki/Configure/Checkers/AuthRealm.pm 0444
lib/Foswiki/Configure/Checkers/AuthScripts.pm 0444
lib/Foswiki/Configure/Checkers/BasicSanity.pm 0444
Expand Down Expand Up @@ -550,7 +549,6 @@ lib/Foswiki/Configure/Checkers/URLPATH.pm 0444
lib/Foswiki/Configure/Checkers/UseClientSessions.pm 0444
lib/Foswiki/Configure/Checkers/UseLocale.pm 0444
lib/Foswiki/Configure/Checkers/UserInterfaceInternationalisation.pm 0444
lib/Foswiki/Configure/Checkers/Validation/Method.pm 0444
lib/Foswiki/Configure/Checkers/WarningFileName.pm 0444
lib/Foswiki/Configure/Checkers/WebMasterName.pm 0444
lib/Foswiki/Configure/Checkers/Welcome.pm 0444
Expand Down
21 changes: 2 additions & 19 deletions core/lib/Foswiki/Render.pm
Original file line number Diff line number Diff line change
Expand Up @@ -557,8 +557,8 @@ sub getRenderedVersion {
\&verbatimCallBack );
$text =~ s|\n?<nop>\n$||o; # clean up clutch

$this->_putBackProtected( \$text, 'script', $removed, \&_filterScript );
Foswiki::putBackBlocks( \$text, $removed, 'literal', '', \&_filterLiteral );
$this->_putBackProtected( \$text, 'script', $removed );
Foswiki::putBackBlocks( \$text, $removed, 'literal', '' );
$this->_putBackProtected( \$text, 'literal', $removed );
Foswiki::putBackBlocks( \$text, $removed, 'dirtyarea' )
if $Foswiki::cfg{Cache}{Enabled};
Expand Down Expand Up @@ -1714,23 +1714,6 @@ sub _adjustH {
return $out;
}

# Only put script and literal sections back if they are allowed by options
sub _filterLiteral {
my $val = shift;
return $val if ( $Foswiki::cfg{AllowInlineScript} );
return CGI::comment(
'<literal> is not allowed on this site - denied by deprecated {AllowInlineScript} setting'
);
}

sub _filterScript {
my $val = shift;
return $val if ( $Foswiki::cfg{AllowInlineScript} );
return CGI::comment(
'<script> is not allowed on this site - denied by deprecated {AllowInlineScript} setting'
);
}

# _takeOutProtected( \$text, $re, $id, \%map ) -> $text
#
# * =$text= - Text to process
Expand Down

0 comments on commit 6532cf9

Please sign in to comment.