Skip to content

Commit 3f36a4d

Browse files
committed
Revert "Decode HTML entities in project files and library files before compilation"
This reverts commit 2fa9595.
1 parent 86e5832 commit 3f36a4d

File tree

2 files changed

+0
-49
lines changed

2 files changed

+0
-49
lines changed

Symfony/src/Codebender/CompilerBundle/Handler/CompilerHandler.php

-6
Original file line numberDiff line numberDiff line change
@@ -67,12 +67,6 @@ function main($request, $compiler_config)
6767
$clang_target_arch = "-D".MCUHandler::$MCU[$mcu]." -DARDUINO=$version -DF_CPU=$f_cpu";
6868
$autocc_clang_target_arch = "-D".MCUHandler::$MCU[$mcu]." -DARDUINO=$version -DF_CPU=$f_cpu -DUSB_VID=$vid -DUSB_PID=$pid";
6969

70-
/*
71-
* Decode any HTML entities found in project/libraries files
72-
*/
73-
$request['files'] = $this->utility->htmlDecodeFiles($request['files']);
74-
$request['libraries'] = $this->utility->htmlDecodeLibraries($request['libraries']);
75-
7670
// Step 1(part 1): Extract the project files included in the request.
7771
$files = array();
7872
$tmpVar = $this->extractFiles($request["files"], $TEMP_DIR, $compiler_dir, $files["sketch_files"], "files");

Symfony/src/Codebender/CompilerBundle/Handler/UtilityHandler.php

-43
Original file line numberDiff line numberDiff line change
@@ -142,47 +142,4 @@ function execWithDebugging($command, /** @noinspection PhpUnusedParameterInspect
142142
echo "$ $command\n";
143143
passthru("$command 2>&1");
144144
}
145-
146-
/**
147-
* Decodes any HTML entities found in the list of provided files and returns the list of decoded
148-
* files. Each of the files should have the following format
149-
* ['filename' => filename, 'content' => code]
150-
*
151-
* @param $files
152-
* @return array
153-
*/
154-
function htmlDecodeFiles($files)
155-
{
156-
if (empty($files)) {
157-
return array();
158-
}
159-
160-
$htmlDecodedFiles = array();
161-
foreach ($files as $file) {
162-
$htmlDecodedFiles[] = array(
163-
'filename' => $file['filename'],
164-
'content' => htmlspecialchars_decode($file['content'])
165-
);
166-
}
167-
return $htmlDecodedFiles;
168-
}
169-
170-
/**
171-
* Applies the htmlDecodeFiles method to the files of each one of the provided libraries.
172-
*
173-
* @param $libraries
174-
* @return array
175-
*/
176-
function htmlDecodeLibraries($libraries)
177-
{
178-
if (empty($libraries)) {
179-
return array();
180-
}
181-
$htmlDecodedLibraries = array();
182-
foreach ($libraries as $libraryName => $libraryFiles) {
183-
$htmlDecodedLibraries[$libraryName] = $this->htmlDecodeFiles($libraryFiles);
184-
}
185-
186-
return $htmlDecodedLibraries;
187-
}
188145
}

0 commit comments

Comments
 (0)