Skip to content

Commit

Permalink
fix (#4555)
Browse files Browse the repository at this point in the history
  • Loading branch information
aynsix authored Oct 23, 2024
1 parent 59342a6 commit 47371bb
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,10 @@ public function getUserSetting(User $user, $name, $default = null)
return array_key_exists($name, $this->usersSettings) ? $this->usersSettings[$name] : $default;
}

if ($name == 'start_page_query') {
return htmlentities($user->getSettings()->get($name)->getValue());
}

return $user->getSettings()->get($name)->getValue();
}

Expand Down
2 changes: 1 addition & 1 deletion templates/web/prod/index.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -986,7 +986,7 @@
{{ 'Aide' | trans }}
</option>
</select>
<input type="text" class="span4" name="start_page_value" value="{{ app['settings'].getUserSetting(app.getAuthenticatedUser(), 'start_page_query')}}" style="display:{% if start_page_pref == 'QUERY' %}inline{% else %}none{% endif %}" />
<input type="text" class="span4" name="start_page_value" value="{{ app['settings'].getUserSetting(app.getAuthenticatedUser(), 'start_page_query') | raw }}" style="display:{% if start_page_pref == 'QUERY' %}inline{% else %}none{% endif %}" />
<input type="button" class="btn btn-inverse preferences-options-submit" value="{{'boutton::valider' | trans }}" />
</form>
</div>
Expand Down

0 comments on commit 47371bb

Please sign in to comment.