Two openly gay students had their pro-LGBT quotes about coming out removed from their school yearbook.

Joey Slivinski and Thomas Swartz, pupils at Kearney High in Missouri, had left inspirational, positive comments underneath their yearbook photographs, only to find they had been deleted in case other students found them offensive.

Mr Slivinski had written: “Of course I dress well. I didn’t spend all that time in the closer for nothing.”

Mr Swartz had added under his picture: “If Harry Potter taught us anything, it’s that no one should have to live in the closet.”

Yet where the quotes were supposed to appear, the space was left blank.

Speaking to local Kansas news outlet KCTV5, Mr Slivinski said: “I went to find my quote in the yearbook but, nothing was there.”

The students are planning to make stickers to insert the quotes into their friends’ yearbooks.

The school’s principal, Dave Schwarzenbach, and the district’s superintendent of schools, Bill Nicely, issued a statement apologising for removing the comments.

“District administrators were made aware of concerns regarding the removal of senior quotes from the school yearbook," the statement said.

"Each year, graduating seniors are provided an opportunity to pick a favourite quote to be placed in the yearbook.

“In an effort to protect our students, quotes that could potentially offend another student or groups of students are not published. It is the school’s practice to err on the side of caution.