When using the MP4 muxer with an iDevice target, OGG-format chapter files are converted to the xml chapters that iDevices support by a simple method in FileUtil.cs. As written, however, it does not escape double-quotes in chapter names. This is a problem because in the xml format, chapter names are bookended by quotes, so if there is a quote mark in the chapter title, the chapter name is truncated, and the structure of the entire xml file is broken. When this happens, the mp4 file fails to mux. This simple patch replaces all " with ". It has been tested as effective in mpc-hc x64, xbmc frodo for rpi, and the iOS 6 video player.
Also in this patch is a removal of a switch that prevents chapters from being added the 'Nero Digital' way if the target is specified as an iDevice. In other words, both ogg format and xml format chapters are muxed into the MP4 file. This means that software and devices that don't understand xml chapters - for example, mpc-hc cannot read them without special filters like lav - have something to fall back on. Adding the ogg chapters and xml chapters does NOT break compatibility with software that can read both (mpc-hc with filters), or with iDevices (which only recognize xml chapters).