mirror of
https://github.com/itflow-org/itflow
synced 2026-07-23 08:50:42 +00:00
Replace Function nullable_htmlentities() with just escapeHtml() and update all instances throughout
This commit is contained in:
@@ -29,7 +29,7 @@ ob_start();
|
||||
$sql_ai_providers = mysqli_query($mysqli, "SELECT * FROM ai_providers");
|
||||
while ($row = mysqli_fetch_assoc($sql_ai_providers)) {
|
||||
$ai_provider_id = intval($row['ai_provider_id']);
|
||||
$ai_provider_name = nullable_htmlentities($row['ai_provider_name']);
|
||||
$ai_provider_name = escapeHtml($row['ai_provider_name']);
|
||||
|
||||
?>
|
||||
<option value="<?php echo $ai_provider_id; ?>"><?php echo $ai_provider_name; ?></option>
|
||||
|
||||
@@ -9,9 +9,9 @@ $sql = mysqli_query($mysqli, "SELECT * FROM ai_models WHERE ai_model_id = $model
|
||||
$row = mysqli_fetch_assoc($sql);
|
||||
$ai_model_ai_provider_id = intval($row['ai_model_ai_provider_id']);
|
||||
$model_id = intval($row['ai_model_id']);
|
||||
$model_name = nullable_htmlentities($row['ai_model_name']);
|
||||
$use_case = nullable_htmlentities($row['ai_model_use_case']);
|
||||
$prompt = nullable_htmlentities($row['ai_model_prompt']);
|
||||
$model_name = escapeHtml($row['ai_model_name']);
|
||||
$use_case = escapeHtml($row['ai_model_use_case']);
|
||||
$prompt = escapeHtml($row['ai_model_prompt']);
|
||||
|
||||
// Generate the HTML form content using output buffering.
|
||||
ob_start();
|
||||
@@ -41,7 +41,7 @@ ob_start();
|
||||
$sql_ai_providers = mysqli_query($mysqli, "SELECT * FROM ai_providers");
|
||||
while ($row = mysqli_fetch_assoc($sql_ai_providers)) {
|
||||
$ai_provider_id = intval($row['ai_provider_id']);
|
||||
$ai_provider_name = nullable_htmlentities($row['ai_provider_name']);
|
||||
$ai_provider_name = escapeHtml($row['ai_provider_name']);
|
||||
|
||||
?>
|
||||
<option <?php if ($ai_provider_id = $ai_model_ai_provider_id) { echo "selected"; } ?> value="<?php echo $ai_provider_id; ?>"><?php echo $ai_provider_name; ?></option>
|
||||
|
||||
@@ -7,9 +7,9 @@ $provider_id = intval($_GET['id']);
|
||||
$sql = mysqli_query($mysqli, "SELECT * FROM ai_providers WHERE ai_provider_id = $provider_id LIMIT 1");
|
||||
|
||||
$row = mysqli_fetch_assoc($sql);
|
||||
$provider_name = nullable_htmlentities($row['ai_provider_name']);
|
||||
$url = nullable_htmlentities($row['ai_provider_api_url']);
|
||||
$key = nullable_htmlentities($row['ai_provider_api_key']);
|
||||
$provider_name = escapeHtml($row['ai_provider_name']);
|
||||
$url = escapeHtml($row['ai_provider_api_url']);
|
||||
$key = escapeHtml($row['ai_provider_api_key']);
|
||||
|
||||
// Generate the HTML form content using output buffering.
|
||||
ob_start();
|
||||
|
||||
Reference in New Issue
Block a user