Joomla editor removes HTML tags in administrator screen - Joomla! Forum - community, help and support
hello,
i have been searching forums find solution can find solutions relevant joomla 1.5 not 2.5.
i have been modifying component include mass mail function can select list of users , post same message.
the reason not wish use standard joomla mass mail functionality select specific users , have email templates have logo embedded, background , opening line changes names each user.
everything works fine apart when specify text body of message - html tags removed.
even basic ones
they displayed
as brief work around new lines have substituted replace function must specify [p] , [/p] replaced afterwards.
all filtering turned off , able edit using html in articles, not in admin menu.
i have had @ using jrequest_allowhtml getvar function, service error 500.
the code seems able pick message is:
i not wish modify joomla core files somehow remove filtering put site in vulnerable state.
the code controller of component in admin site is:
i have tried tinymce, jce , standard text area , problem persists.
any appreciated
kind regards,
dave
i have been searching forums find solution can find solutions relevant joomla 1.5 not 2.5.
i have been modifying component include mass mail function can select list of users , post same message.
the reason not wish use standard joomla mass mail functionality select specific users , have email templates have logo embedded, background , opening line changes names each user.
everything works fine apart when specify text body of message - html tags removed.
even basic ones
code: select all
<p> test </p><p>new line</p>they displayed
code: select all
<p>test new line</p>as brief work around new lines have substituted replace function must specify [p] , [/p] replaced afterwards.
all filtering turned off , able edit using html in articles, not in admin menu.
i have had @ using jrequest_allowhtml getvar function, service error 500.
the code seems able pick message is:
code: select all
$message =& jtable::getinstance('message', 'table');i not wish modify joomla core files somehow remove filtering put site in vulnerable state.
the code controller of component in admin site is:
code: select all
function massmail(){
// check request forgeries
jrequest::checktoken() or jexit('invalid token');
$itemid = jrequest::getint('itemid');
$now = jfactory::getdate();
$user = jfactory::getuser();
$post = jrequest::get('post');
$message =& jtable::getinstance('message', 'table');
//$message = jrequest::getvar('message', '', 'post', 'string');
//take recipients in array
$recipients = jrequest::getvar('id_categ');
//$recipient = jrequest::getvar('recipient', '', 'post', 'string');
foreach($recipients $recipient){
$recipientinfo = jfactory::getuser($recipient); //get recipient info recipient's username
//check if recipient info valid/username exists
if(empty($recipientinfo)){
$msg = jtext::_('com_jblance_invalid_username');
//$link = jroute::_('index.php?option=com_jblance&view=admproject&layout=dashboard', false);
$link = jroute::_('index.php?option=com_jblance&view=admproject&layout=mail', false);
$this->setredirect($link, $msg, 'error');
return false;
}
$message->date_sent = $now->tomysql();
$message->idfrom = $user->id;
$message->idto = $recipientinfo->id;
//save file attachment `if` checked
$chkattach = jrequest::getvar('chk-attach', 0, 'post', 'int');
$attachedfile = jrequest::getvar('attached-file', '', 'post', 'string');
if($chkattach){
$message->attachment = $attachedfile;
}
else {
$attfile = explode(';', $attachedfile);
$filename = $attfile[1];
$delete = jbmessage_path.ds.$filename;
unlink($delete);
}
if(!$message->save($post)){
jerror::raiseerror(500, $message->geterror());
}
//send pm notification email
$jbmail = jblancehelper::get('helper.email'); // create instance of class emailhelper
$post['idfrom'] = $user->id;
$post['idto'] = $recipientinfo->id;
$jbmail->massmailnotification($post);
$msg = jtext::_('com_jblance_message_sent_successfully');
$return = jroute::_('index.php?option=com_jblance&view=admproject&layout=dashboard', false);
$this->setredirect($return, $msg);
}
}i have tried tinymce, jce , standard text area , problem persists.
any appreciated
kind regards,
dave
Comments
Post a Comment