Re: Improve UX of YUM/DNF download form

Поиск
Список
Период
Сортировка
От Sehrope Sarkuni
Тема Re: Improve UX of YUM/DNF download form
Дата
Msg-id CAH7T-aoUB9xZ+TGCjQQ1sJU0_PknzsAqipqs3dy3Tv9b91UMYA@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Improve UX of YUM/DNF download form  (Magnus Hagander <magnus@hagander.net>)
Ответы Re: Improve UX of YUM/DNF download form
Список pgsql-www
I took a peek at the updated yum.js. There's a couple unused variables in the script generation and it doesn't escape the generated text before assigning it to the DOM node. Not an issue now as there's nothing that'd break it, but if it's ever updated to include a redirect ("<") or something else hokey it'd break.

How about the attached?  It splits the script generation into its own function returning a string and has the archChanged() only handle updating the DOM. It uses jQuery .text(...) for the DOM update so that the contents are escaped.

I don't have the full site running locally but adding the new DOM node and copy / pasting in the browser to manipulate the live site with this code seems to work fine.

Regards,
-- Sehrope Sarkuni
Founder & CEO | JackDB, Inc. | https://www.jackdb.com/

Вложения

В списке pgsql-www по дате отправления:

Предыдущее
От: Magnus Hagander
Дата:
Сообщение: Re: Improve UX of YUM/DNF download form
Следующее
От: Dave Page
Дата:
Сообщение: Re: Improve UX of YUM/DNF download form