2
# FCKeditor - The text editor for internet
3
# Copyright (C) 2003-2005 Frederico Caldeira Knabben
5
# Licensed under the terms of the GNU Lesser General Public License:
6
# http://www.opensource.org/licenses/lgpl-license.php
8
# For further information visit:
9
# http://www.fckeditor.net/
11
# "Support Open Source software. What about a donation today?"
14
# This is the File Manager Connector for Perl.
17
# Takashi Yamaguchi (jack@omakase.net)
22
local($sourceString, $charToRemove) = @_;
23
$sPattern = '^' . $charToRemove . '+' ;
24
$sourceString =~ s/^$charToRemove+//g;
30
local($sourceString, $charToRemove) = @_;
31
$sPattern = $charToRemove . '+$' ;
32
$sourceString =~ s/$charToRemove+$//g;
36
sub ConvertToXmlAttribute
40
# return utf8_encode(htmlspecialchars($value));
48
$ch =~ s/&/&/g; # &
49
$ch =~ s/\"/"/g; #"
50
$ch =~ s/\'/'/g; # '
51
$ch =~ s/</</g; # <
52
$ch =~ s/>/>/g; # >