[Gambas-user] Supped up the WebAudio.class
Benoit Minisini
benoit.minisini at gambas-basic.org
Fri Jul 29 12:12:25 CEST 2022
Le 29/07/2022 à 10:53, Bruce Steers a écrit :
>
>
> On Thu, 28 Jul 2022 at 16:20, Benoit Minisini
> <benoit.minisini at gambas-basic.org
> <mailto:benoit.minisini at gambas-basic.org>> wrote:
>
> Le 28/07/2022 à 15:41, Bruce Steers a écrit :
> >
> > I leave it in your oh so very capable hands :)
> >
> > Respects
> > BruceS
> >
>
> I have fixed a lot of problems in the last commit. Please look at it
> carefully, and ask me if you don't understand why what you wrote was
> wrong.
>
>
> Seems I didn't use the correct naming convention for $sSources but
> didn't see many actual "bug" fixes.
1) The way you handled the 'Source' property was incorrect. You must not
store the reference of the array sent by the user, you had to make a
copy so that the object owns the array. And you have to deal with NULL
values.
2) You generated HTML without using the Html() conversion function,
leading to possible incorrect HTML generation or worse (script
injection...).
3) Your automatic detection of mimetypes didn't work.
4) The javascript emitted when setting the Position property was
incorrect, because of a bad use of Str() instead of CStr(). Or use JS()
like I did, if you want to be sure to emit syntactically correct javascript.
Try at least to never do bug #2 and bug #4 (confusion between Str and
CStr) again in any of your projects. The other are less critical! :-)
Regards,
--
Benoît Minisini.
More information about the User
mailing list