mirror of
https://github.com/ansible/awx.git
synced 2026-01-11 18:09:57 -03:30
Merge pull request #10504 from nixocio/ui_issue_7524
Encode/decode question variables Encode/decode question variables See: #7524 Reviewed-by: Alex Corey <Alex.swansboro@gmail.com> Reviewed-by: Tiago Góes <tiago.goes2009@gmail.com>
This commit is contained in:
commit
c1913b0d44
@ -98,7 +98,11 @@ function SurveyListItem({
|
||||
dataListCells={[
|
||||
<DataListCell key="name">
|
||||
<>
|
||||
<Link to={`survey/edit?question_variable=${question.variable}`}>
|
||||
<Link
|
||||
to={`survey/edit?question_variable=${encodeURIComponent(
|
||||
question.variable
|
||||
)}`}
|
||||
>
|
||||
{question.question_name}
|
||||
</Link>
|
||||
{question.required && (
|
||||
|
||||
@ -15,7 +15,9 @@ export default function SurveyQuestionEdit({ survey, updateSurvey }) {
|
||||
const match = useRouteMatch();
|
||||
const { search } = useLocation();
|
||||
const queryParams = new URLSearchParams(search);
|
||||
const questionVariable = queryParams.get('question_variable');
|
||||
const questionVariable = decodeURIComponent(
|
||||
queryParams.get('question_variable')
|
||||
);
|
||||
|
||||
if (!survey) {
|
||||
return <ContentLoading />;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user