  This paper is concerned with the existence and uniqueness of weak solutions
to the Cauchy-Dirichlet problem of backward stochastic partial differential
equations (BSPDEs) with nonhomogeneous terms of quadratic growth in both the
gradient of the first unknown and the second unknown. As an example, we
consider a non-Markovian stochastic optimal control problem with cost
functional formulated by a quadratic BSDE, where the corresponding value
function satisfies the above quadratic BSPDE.
