Avoid a crash trying to get a substring whose start is after its end.

Constrain the start of the extracted text, not just the end, to the length
of the content.

Approver: ryanpc
Bug: 2323813
1 file changed