Sorry if this is too brief, I'm on a mobile device. The syntax errors might been introduced with commit: 7e75fdfa1644dc0cf8a7a5f62a15511e17a6fe8c Basicallly single quotes were added, which end the javascript string literals too soon. E.G. '... src=$...' was altered to '... src='$...'...' instead of "... src='$...'..." or '... src=\'$...\'...'
Invalid javascript in ui-lib.pl with v1.850